码迷,mamicode.com
首页 > 其他好文 > 详细

git:could not open a connection to your authentication agent

时间:2018-08-24 13:11:56      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:push   auth   执行   git   color   from   mil   file   pen   

git:could not open a connection to your authentication agent

?

错误:

vagrant@homestead:~/Code/sample$ git push -u origin master

git@github.com: 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

?

上面有可能会找不到路径

?

vagrant@homestead:~/Code/sample$ ssh-add ~/.ssh/id_key

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

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

?

?

vagrant@homestead:~$ cd .ssh/

?

vagrant@homestead:~/.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

标签:push   auth   执行   git   color   from   mil   file   pen   

原文地址:https://www.cnblogs.com/lovebing/p/9528974.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!