git ssh key pair 配置出错
来源:2-25 git版本控制工具安装与配置讲解(选看)
冬瓜撞地球
2017-04-24
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
/c/Users/Administrator/.ssh/id_rsa already exists.
Overwrite (y/n)?
Administrator@PC-201503292140 MINGW64 ~
$ y
bash: y: command not found
Administrator@PC-201503292140 MINGW64 ~
$ ssh-add ~/.ssh/id_rsa
Could not open a connection to your authentication agent.
Administrator@PC-201503292140 MINGW64 ~
$ ssh-add ~/.ssh/rsa
Could not open a connection to your authentication agent.
Administrator@PC-201503292140 MINGW64 ~
$ eval `ssh-agent`
Agent pid 3172
Administrator@PC-201503292140 MINGW64 ~
$ ssh-add ~/.ssh/rsa
/c/Users/Administrator/.ssh/rsa: No such file or directory
Administrator@PC-201503292140 MINGW64 ~
$
4回答
-
Geely
2017-04-24
先执行 eval `ssh-agent` (是~键上的那个`) 再执行 ssh-add ~/.ssh/rsa成功
ssh-add -l 查看有没有刚才新增的
应该就会有的了。
122017-05-03 -
Geely
2017-04-26
要执行ssh-add ~/.ssh/id_rsa
ppt那个我去检查一下,到时候更新一下那一段。谢谢@amber
00 -
蓝烟amber
2017-04-25
老师的ppt里有错误,执行“eval `ssh-agent`”后,再执行“ssh-add ~/.ssh/id_rsa”
40 -
冬瓜撞地球
提问者
2017-04-24
我是装在D盘的
012017-04-26
相似问题