I have two git accounts, one for work and one for personal use. I am trying to set up two SSH keys. I have them generated, and I can push to my work repo without problems.

I followed this guide to set everything up. When I reach

SSH-add ~/.SSH/id_rsa_client

I got the error

Could not open a connection to your authentication agent.

I continued with setup anyway. Now when I try to push to my private repo, I get

Permission denied (publickey)
fatal: The remote end hung up unexpectedly

How can I set this up in Windows 7?


Portable Git is designed so that instead of being installed in one place, like Users/Dude, it only looks at its own "tree", so it can be placed on a (portable) USB stick and used right away on any Windows computer without installing it.

You can have 2 git identities if you make 2 directories with "directory trees" of Portable Git.

Whatever you do from the bash shell of one of them is kept in that directory structure and separate from the other. Set up keys, email names, etc for each one. Just keep track of which bash window was opened from which directory.

| improve this answer | |

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.