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的更多相关文章

  1. 解决git客户端MINGW32下的“Could not open a connection to your authentication agent.”

    使用git, 下载客户端后想进行和github 进行ssh 互通 出现以下情况: hadoop@deng-PC MINGW32 ~/.ssh$ ssh-add ~/.ssh/id_rsaCould n ...

  2. git ssh-add 报错 ssh-add Could not open a connection to your authentication agent

    $ ssh-add ~/.ssh/id_rsa.pub Could not open a connection to your authentication agent. 启动ssh-agent服务 ...

  3. Git Bash for Windows add ssh key时报Could not open a connection to your authentication agent.

    $ ssh-add id_rsa_bitbucketCould not open a connection to your authentication agent. 运行: $ ssh-agent ...

  4. (诊断)为GitHub添加SSH key时出现“Could not open a connection to your authentication agent”错误的应对方案(转)

    在为windows 环境下的github账户添加SSH key时,需要在Git Bash执行如下命令: 第一步:检查已有的SSH keys $ ls -al ~/.ssh 第二步:生成新的SSH ke ...

  5. 执行ssh-add时出现Could not open a connection to your authentication agent

    若执行ssh-add /path/to/xxx.pem是出现这个错误:Could not open a connection to your authentication agent,则先执行如下命令 ...

  6. ssh-add 报错 Could not open a connection to your authentication agent

    ERROR: [root@testcentos01 ~]# ssh-add Could not open a connection to your authentication agent 在shel ...

  7. ssh-add Could not open a connection to your authentication agent.

    ssh-add 报错Could not open a connection to your authentication agent. 需要执行以下代码 eval `ssh-agent -s` ssh ...

  8. 使用命令:ssh-add 时,出现 “Could not open a connection to your authentication agent.”

    为 GitHub 账号设置 SSH Key时, 使用命令:ssh-add,出现“Could not open a connection to your authentication agent”,解决 ...

  9. Could not open a connection to your authentication agent

    执行ssh-add ~/.ssh/rsa  就会遇到上述错误了 解决方案: 先执行  eval `ssh-agent`  (是-键上的那个`) 再执行 ssh-add ~/.ssh/rsa成功 ssh ...

随机推荐

  1. 【二分答案】【DFS】【分类讨论】Gym - 100851F - Froggy Ford

    题意:河里有n块石头,一只青蛙要从左岸跳到右岸,你可以再在任意一个位置放一块石头,使得在最优方案下,青蛙单步跳的距离的最大值最小化,输出该位置. 将原图视作完全图,二分答案mid,然后在图中只保留小于 ...

  2. bzoj1036 count 树链剖分或LCT

    这道题很久以前用树链剖分写的,最近在学LCT ,就用LCT再写了一遍,也有一些收获. 因为这道题点权可以是负数,所以在update时就要注意一下,因为平时我的0节点表示空,它的点权为0,这样可以处理点 ...

  3. php上传文件常见问题(基础)

    既然上一篇文章<php上传中文文件文件名乱码问题>遇到了文件上传的问题,干脆把php上传文件时经常碰到的几个问题总结一下吧,以后用到时不用再去找了. 1.先做个最简单的上传文件 <h ...

  4. python开发_shelve_完整版_博主推荐

    ''' python中的shelve模块,可以提供一些简单的数据操作 他和python中的dbm很相似. 区别如下: 都是以键值对的形式保存数据,不过在shelve模块中, key必须为字符串,而值可 ...

  5. [转]Fragment跳转至Activity或者Fragment

    1.Fragment跳转至Activity 从fragment中跳转和从activity中跳转类似,只不过你要先通过fragment的getActivity方法获取到显示这个fragment的acti ...

  6. 使用pyplot和seaborn进行画图

    pyplot的一些知识 matplotlab中的对象: matplotlib是面向对象的,在画图的时候我们了解一些对象,对我们画图是有帮助的.绘图的对象大致分为三层: backend_bases.Fi ...

  7. C语言 关键字

    auto 局部变量(自动储存)break无条件退出程序最内层循环case switch语句中选择项char单字节整型数据const定义不可更改的常量值continue中断本次循环,并转向下一次循环de ...

  8. 老生常谈javascript的5中继承

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. Java ClassLoader加载机制理解 实际例子

    针对 Java ClassLoader加载机制理解, 做了个如何自定制简单的ClassLoader,并成功加载指定的类. 不废话,直接上代码. package com.chq.study.cl; im ...

  10. ArcGIS Engine中空间参照(地理坐标)相关方法总结转

    ArcGIS Engine中空间参照(地理坐标)相关方法总结 来自:http://blog.csdn.net/u011170962/article/details/38776101 1.创建空间参考 ...