Reputation: 24316
can anyone help, i am on windows and git is working with my origin set to github.
Of course everytime i wish to pull / push or anything i need to supply the passphrase of the key for github.
According to what i have read i need to edit either a ~/.profile or ~/.bashrc and enter some text
see https://help.github.com/articles/working-with-ssh-key-passphrases
I have done this many times, i actually entered it in both files but when i open up a new GitBash windows nothing seems to run (i assume something is suppose to run and ask my for my passphrase according to the link above).
So of course every Push or Pull again asks me for the passphrase every single time.
I am obviosly missing something here can anyone help?
Remembering that i am on windows :-) and using gitbash that ships with git for windows.
Thanks in advance
Upvotes: 3
Views: 4234
Reputation: 9480
On Windows 10 this worked for me
touch ~/.profile
start ~/.profile
to open .profile
.profile
#! /bin/bash
eval `ssh-agent -s`
ssh-add ~/.ssh/*_rsa
This is based on this answer. The only difference is that .bashrc
did not work, instead .profile
worked.
Upvotes: 0
Reputation: 24316
Well after a lot of investigation, i found this Remember Password, Git bash under windows
which explains exactly what is needed, its different from linux it appears.
Upvotes: 4
Reputation: 4516
This might happen in case You've cloned the repository through the "https" method and now trying to do push/pull the "ssh" way or other way round. See if this would work out for you :
git remote set-url origin [email protected]:your_account/your_repo.git
Upvotes: 1