我试图使用SSH身份验证克隆或推送到Gitlab服务器上的一个空存储库,但每当我尝试时,都会询问git密码(使用Git Bash):
myname@PC0016 MINGW64 /c/users/myname/dev
$ git clone git@git.repo.local:android/myApp.git
Cloning into 'myApp'...
git@git.repo.local's password:我尝试过管理员给我的密码和Git密码,但是我得到:
Please make sure you have the correct access rights
and the repository exists.当我将SSH密钥添加到Gitlab中的项目文件中时,为什么需要提供这个密码?我遗漏了什么?谢谢!
发布于 2016-09-15 08:35:37
创建一个ssh_config`,您将在其中将客户指向您的身份文件:
Host git.repo.local
IdentityFile C:\Users\myname\.ssh\id_rsa还将此文件存储在/z/.ssh/config中,以供客户端读取。
https://stackoverflow.com/questions/39506371
复制相似问题