I try to link my SSH key with SSH Agent.

I'm on Windows 7 Pro, and I'm using Git Bash console.

I've this folder structure:


Where I've put my SSH key files as follow:

  • myname.ssh (about private SSH key)
  • myname.pub (about public SSH key)

After this, I launch my SSH Agent like this:

By Git Bash Console: ssh-agent -s

The echo is the follow:

SSH_AUTH_SOCK=/tmp/ssh-LpOZfV5krHuP/agent.3984; export SSH_AUTH_SOCK;
echo Agent pid 6128;

Now, if I run my Task Summary I show the ssh_agent.exe as pid 6128 correctly.

Now I try to link my agent with my SSH key as follow:

  • The first attempt: ssh-add ~/.ssh/id_rsa FAILED

  • The second attempt: ssh-add ~/.ssh/id_rsa/myname.ssh FAILED

  • The third attempt: ssh-add ~/.ssh/id_rsa/myname.pub FAILED

  • Other attempts: I tried with complete path but always... FAILED

Please if you know my fault, help me.

The error returned:

could not open a connection to your authentication agent


If you are behind a firewall please try this before:

git config --global url."https://".insteadOf git://
| improve this answer | |
  • what should be the url to be? – Jaskey Oct 20 '15 at 2:21

You need to execute the output of ssh-agent to apply the changes to your current shell:

eval $(ssh-agent -s)
| improve this answer | |
  • Dear, your solution resolve my issue but now I have another error. After this, I launch: git submodule update, but console returns unable to connect to github.com errno = No error – Joe Taras Apr 15 '15 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.