SSH-AGENT could not open connection

11,738

Solution 1

If you are behind a firewall please try this before:

git config --global url."https://".insteadOf git://

Solution 2

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

eval $(ssh-agent -s)
Share:
11,738

Related videos on Youtube

Joe Taras
Author by

Joe Taras

Updated on September 18, 2022

Comments

  • Joe Taras
    Joe Taras over 1 year

    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:

    C:\Users\MyName.ssh\id_rsa

    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;
    SSH:AGENT_PID=6128; export SSH_AGENT_PID;
    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

  • Joe Taras
    Joe Taras about 9 years
    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
  • JaskeyLam
    JaskeyLam over 8 years
    what should be the url to be?