Connecting git to github on windows 7 without bash
I had the same problem. I accidently added the wrong directory to the path.
After I changed that from *\Git\bin\
to *\Git\cmd\
everything worked.
git.cmd
sets up the environment variables.
My solution to the
"Could not open a connection to your authentication agent."
error on Windows 7 was to first run ssh -v git@github.com
in the git Bash console to find out what sort of public key file Github was looking for. The filename I saw was id_rsa
.
Then, I viewed the c:\users\username\.ssh
folder in Windows Explorer and noticed that while there was no id_rsa
file, there was github_rsa
and github_rsa.pub
.
Copying these files in the c:\users\username\.ssh
folder and renaming the copies to id_rsa
and id_rsa.pub
respectively solved the issue for me.
I was then able to push local commits to the repository on Github.
The command you're looking for is: ssh-add C:\path\to\key
First, you may want to find out where ssh is currently looking for your keys, by running ssh -v git@github.com