网上有好多教程都是让使用 “ssh-add 私匙文件路径 ” 这条命令,
试了一下会报如下错误:Could not open a connection to your authentication agent
Administrator@WIN-HVEG7CTE513 MINGW32 ~ $ exec ssh-agent bash Administrator@WIN-HVEG7CTE513 MINGW32 ~ $ eval ssh-agent -s SSH_AUTH_SOCK=/tmp/ssh-xxQEgvgMUMh7/agent.1304; export SSH_AUTH_SOCK; SSH_AGENT_PID=3768; export SSH_AGENT_PID; echo Agent pid 3768; Administrator@WIN-HVEG7CTE513 MINGW32 ~ $ ssh-add "C:\Users\Administrator\key\openssh-key" Identity added: C:\Users\Administrator\key\openssh-key (C:\Users\Administrator\key\openssh-key) Administrator@WIN-HVEG7CTE513 MINGW32 /d/git/blog-wenzg.rhcloud.com $ git clone ssh://*********@*********.rhcloud.com/~/git/blog.git
Cloning into 'blog'... remote: Counting objects: 4445, done. remote: Compressing objects: 100% (2323/2323), done. remote: Total 4445 (delta 2033), reused 4445 (delta 2033) Receiving objects: 100% (4445/4445), 12.03 MiB | 208.00 KiB/s, done. Resolving deltas: 100% (2033/2033), done. Checking connectivity... done.