博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git:could not open a connection to your authentication agent
阅读量:7216 次
发布时间:2019-06-29

本文共 651 字,大约阅读时间需要 2 分钟。

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)

 

 

 

文章来源:

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

转载地址:http://iwxym.baihongyu.com/

你可能感兴趣的文章
SVN
查看>>
C语言编程写的一个http下载程序(王德仙)2012-04-08
查看>>
CCF201409-3 字符串匹配(100分)
查看>>
UVALive2203 UVa10042 Smith Numbers【质因数分解+素数判定+数位之和】
查看>>
Project Euler Problem 9: Special Pythagorean triplet
查看>>
HDU5701 中位数计数【中位数】
查看>>
Python 深浅拷贝 (Shallow copy and Deep copy in Python)
查看>>
Axure
查看>>
屏幕截取工具
查看>>
C语言第七次作业---要死了----
查看>>
Jquery事件绑定冲突
查看>>
偶现bug如何处理?
查看>>
yum命令简介
查看>>
【Udacity】朴素贝叶斯
查看>>
看漫画,学 Redux
查看>>
Spark Streaming揭秘 Day19 架构设计和运行机制
查看>>
【转载】WinCE OAL中的电源管理函数
查看>>
【iOS】Objective-C简约而不简单的单例模式
查看>>
Java实现扫码二维码登录
查看>>
python之字符串的操作和使用
查看>>