简体   繁体   English

Git SSH 密钥 - 不询问 SSH 密码

[英]Git SSH Key - not asking for SSH password

I'm having trouble accessing my gitlab repo through SSH.我无法通过 SSH 访问我的 gitlab 存储库。

When trying the connection through below line I get authenticated.当通过下面的行尝试连接时,我获得了身份验证。

ssh -T git@gitlab.<mydomain>

But when trying to access through the lines below its not prompting for my SSH password.但是当试图通过下面的行访问时,它不会提示我输入 SSH 密码。

PS ~> git clone git@gitlab.<mydomain>:<repo name>.git      
Cloning into '<repo name>'...
git@gitlab.<mydomain>'s password:
Permission denied, please try again.

The git remote -v seems to be correct: git 远程 -v 似乎是正确的:

origin  git@gitlab.<mydomain>:<repo name>.git (fetch)
origin  git@gitlab.<mydomain>:<repo name>.git (push)

Any more ideas on how to authenticate through SSH?关于如何通过 SSH 进行身份验证的更多想法?

The first uses (Open)SSH's authentication scheme, which includes looking in the ~/.ssh directory for known SSH keys.第一个使用 (Open)SSH 的身份验证方案,其中包括在~/.ssh目录中查找已知的 SSH 密钥。

The second uses Gitlab's SSH authentication scheme, which requires you to add your public key through the Gitlab interface .第二种使用Gitlab的SSH认证方案,需要你通过Gitlab接口添加你的公钥 It should be somewhere under Account Settings->Security->SSH keys.它应该在帐户设置-> 安全-> SSH 密钥下的某个位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM