I managed to make git work for pull and push over http. Now the last step it getting around the git push asking twice for my password. I don't want to use the .netrc file. any idea ? thanks
2 Answers
Update: There's a better solution in git now, which I described in answer to this other question:
I've kept the old answer I wrote below for reference.
If you don't want to use .netrc
, another option is to specify your username and password in the URL that your remote refers to, e.g. if your origin
remote is:
http://some.server/whatever.git
... you could change it to http://myusername:mypassword@some.server/whatever.git
with the following command:
git remote set-url origin http://myusername:mypassword@some.server/whatever.git
... and you won't need to enter your password manually. This does mean that your password will be stored in plain text in your .git/config
file, however. If this is a problem, you're better off using public key based authentication with SSH.

- 1
- 1

- 446,582
- 72
- 411
- 327
What about you make an ssh connection without password to the git server? Ssh connection without password

- 25,806
- 45
- 116
- 158