SSH密钥在Gitlab上请求密码 [英] SSH Key Keeps Asking for Password on Gitlab
问题描述
我现在正在调试这个问题一两个小时。
我目前使用Gitlab和Mac OS X 10.9.2。
今天,我试图从我们的主分支中获取 git pull origin master
,以便我可以将最新版本发展。我一直使用这些配置,并且不记得改变任何东西。此配置一直有效,并且从来没有提示我输入密码。今天,我得到了这个错误:
My-MacBook-Pro:branch_name loop $ git pull origin master
git @ domain的密码:
这是我的〜/ .ssh /
权限:
My-MacBook-Pro:.ssh循环$ ls -l
共计24
-rw ------- 1个循环人员1766 2013年10月31日github_rsa
-rw-r - r-- 1个循环人员403 10月31 2013 github_rsa.pub
-rw-r - r-- 1循环员工2408 Sep 15 15:08 known_hosts
我尝试了各种各样的事情:
-
重新启动
com.openssh.sshd
-
重新启动
org.openbsd.ssh-agent $ c $我确保我在Gitlab上的公钥与我的
github_rsa.pub
相同。 ,而且确实是一样的。 -
已检查
/var/log/authd.log
与SSH有关的错误,但没有什么相关的。
可能是什么问题?
将文件github_rsa重命名为id_rsa。
现在无法找到它,因为你已经重新命名了。
在SSH中的一个问题尝试使用 -vvv
选项运行它,以便获得详细的输出!
希望这能解决问题!
快乐接力!
I have been debugging the issue for an hour or two now.
I am currently using Gitlab and Mac OS X 10.9.2.
Today, I was trying to git pull origin master
from our master branch so I can get the latest version to develop on. I have always used these configurations, and don't recall changing anything. This configuration has always worked, and never prompted me for a password. Today, I got this error:
My-MacBook-Pro:branch_name loop$ git pull origin master
git@domain's password:
Here are my ~/.ssh/
permissions:
My-MacBook-Pro:.ssh loop$ ls -l
total 24
-rw------- 1 loop staff 1766 Oct 31 2013 github_rsa
-rw-r--r-- 1 loop staff 403 Oct 31 2013 github_rsa.pub
-rw-r--r-- 1 loop staff 2408 Sep 15 15:08 known_hosts
I have tried various things:
restarting
com.openssh.sshd
restarting
org.openbsd.ssh-agent
I made sure that my public key on Gitlab is the same as my
github_rsa.pub
, and it indeed was the same.I have uncommented
sshd_config
's toPasswordAuthentication no
Checked
/var/log/authd.log
for errors relating to SSH, but nothing relevant.
What could be the issue?
Rename the file github_rsa to id_rsa.
SSH looks for the private key by "name" id_rsa in .ssh folder of your home.
Its not able to find it now because you have renamed it.
PS: Whenever you encounter a problem in SSH try running it with option -vvv
so that you get a verbose output!
Hope this solves the problem!
Happy Gitting!
这篇关于SSH密钥在Gitlab上请求密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!