我试图简单地使用HTTPS和SSH克隆一个Gitlab项目,但它们都不起作用并打印出atuhentication失败消息。
尝试使用https地址时:
git clone https://gitlab.com/project.aa/project.git
Cloning into 'frontend'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/project.aa/project.git'
通过我的SSH密钥,我得到的消息是:
Cloning into 'frontend'...
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我该怎么办?
答案 0 :(得分:4)
尝试注销和登录,并使用与克隆存储库相同的凭据。如果问题仍然存在:在Windows中,搜索Credential Manager
。在其中选择Windows manager
。选择您的Gitlab凭据并进行修改。