[英]Git asking for git@git.repo.local password
我正在尝试使用 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 中的项目文件时,为什么需要提供此密码? 我错过了什么? 谢谢!
创建一个 ssh_config`,您将在其中将您的客户端指向您的身份文件:
Host git.repo.local
IdentityFile C:\Users\myname\.ssh\id_rsa
还要将此文件存储在/z/.ssh/config
以供客户端读取。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.