您的位置:首页 > 其它

ssh链接git服务器,解决push pull要求输入密码问题

2015-06-23 10:31 399 查看
摘要: ssh链接git服务器,解决Agent admitted failure to sign using,原因是ssh-agent服务没把新产生的/home/you/.ssh/id_rsa 包含进去

ssh链接git服务器,解决Agent admitted failure to sign using,错误信息如下:

Agent admitted failure to sign using the key.
git@git.oschina.net's password:
Permission denied, please try again.
git@git.oschina.net's password:
Permission denied, please try again.
git@git.oschina.net's password:
Permission denied (publickey,password,keyboard-interactive).
fatal: Could not read from remote repository.

原因是ssh-agent服务没把新产生的/home/you/.ssh/id_rsa 包含进去,解决方法如下:

# start the ssh-agent in the background
eval "$(ssh-agent -s)"
# Agent pid 59566
ssh-add
# Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]
# Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)


如果你的私钥文件已经改名,不是默认的id_rsa,请输入你的正确的私钥文件路径:

# start the ssh-agent in the background
eval "$(ssh-agent -s)"
# Agent pid 59566
ssh-add ~/.ssh/my_other_key
# Enter passphrase for /home/you/.ssh/my_other_key: [tappity tap tap]
# Identity added: /home/you/.ssh/my_other_key (/home/you/.ssh/my_other_key)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: