git 如何解决 gitlab 拒绝访问?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41263662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:42:08  来源:igfitidea点击:

How to solve Access denied in gitlab?

gitgitlab

提问by samuel toh

When I run : git push, there is exist error like this :

当我运行 : 时git push,存在如下错误:

remote: Access denied
fatal: unable to access 'https://gitlab.com/myname/mysystem.git/': The requested URL returned error: 403

Is there any people who can help me?

有没有人可以帮助我?

采纳答案by afxentios

You need to add an SSH key to your GitLab and make sure git is using that key.

您需要向 GitLab 添加 SSH 密钥,并确保 git 正在使用该密钥。

You can find this documentationhelpful.

您会发现此文档很有帮助。

回答by mpro

For Windows users, check this unbelievable easy solution, which works for me:

对于 Windows 用户,请查看这个对我有用的难以置信的简单解决方案:

Go to Windows Credential Manager(press Windows Key and type 'credential') to edit the git entry under Windows Credentials. Replace old password with the new one.

转到 Windows凭据管理器(按 Windows 键并键入“凭据”)以编辑 Windows 凭据下的 git 条目。用新密码替换旧密码。

回答by serv-inc

What might help is

可能有帮助的是

git config --system --unset credential.helper

then enter new password for Git remote server.

git config --system --unset credential.helper

然后输入 Git 远程服务器的新密码。

回答by Mahdi Abdi

if you made your account by signing in with Github or Bitbucket, etc. add a password to your account so you can push, pull and clone with Gitlab.

如果您通过 Github 或 Bitbucket 等登录创建了您的帐户,请为您的帐户添加密码,以便您可以使用 Gitlab 推送、拉取和克隆。

回答by Gust

Very late here, but for posterity's sake:

这里很晚了,但为了后代:

If you do not have a gitlab password (initially signed up through github or something), then this will fail. You will just need to go to the page and create a password. At least that worked for me.

如果您没有 gitlab 密码(最初是通过 github 或其他方式注册的),那么这将失败。您只需要转到该页面并创建密码即可。至少这对我有用。

回答by Keshav Gera

For Windows User

对于 Windows 用户

Go to Control Panel->Credential Manager->Windows Credentials select github or gitlab credentials and modify it. This is for windows10

进入 Control Panel->Credential Manager->Windows Credentials 选择 github 或 gitlab 凭据并修改它。这是用于 windows10

enter image description here

在此处输入图片说明

Update your credentials again

再次更新您的凭据

and add access token here

并在此处添加访问令牌

https://gitlab.com/profile/personal_access_tokens

https://gitlab.com/profile/personal_access_tokens