git:could not open a connection to your authentication agent

Posted lovebing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git:could not open a connection to your authentication agent相关的知识,希望对你有一定的参考价值。

git:could not open a connection to your authentication agent

?

错误:

[email protected]:~/Code/sample$ git push -u origin master

[email protected]: Permission denied (publickey).

?

fatal: Could not read from remote repository.

?

Please make sure you have the correct access rights

and the repository exists.

?

?

先执行 ?eval `ssh-agent` ?

再执行 ssh-add ~/.ssh/rsa

?

上面有可能会找不到路径

?

[email protected]:~/Code/sample$ ssh-add ~/.ssh/id_key

/home/vagrant/.ssh/id_key: No such file or directory

切换到秘钥目录在执行就行了

?

?

[email protected]:~$ cd .ssh/

?

[email protected]:~/.ssh$ ssh-add ~/.ssh/id_rsa

?

?

成功:Identity added: /home/vagrant/.ssh/id_rsa (/home/vagrant/.ssh/id_rsa)

?

?

?

文章来源:刘俊涛的博客

欢迎关注,有问题一起学习欢迎留言、评论。

以上是关于git:could not open a connection to your authentication agent的主要内容,如果未能解决你的问题,请参考以下文章

Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn

layer.open is not a function怎么解决

xxx.nsf has not been opened yet解决方法

domino无法启动:could not open id file

Could not open input file: composer.phar

mongodb.open is not a function