I'm using GIT for my projects. Now I want to integrate it with github, so I created a remote:
git remote add github https://WouterJ@github.com/WouterJ/project.git
But now I need to fill in a password for fetching, something that I don't want. So I decided to use a different url for fetching:
git remote set-url github http://github.com/WouterJ/project.git
git remote set-url --push github https://WouterJ@github.com/WouterJ/project.git
If I run git remote -v
I get this:
$ git remote -v
github http://github.com/WouterJ/project.git (fetch)
github https://WouterJ@github.com/WouterJ/project.git (push)
origin http://github.com/WouterJ/project.git (fetch)
origin http://github.com/WouterJ/project.git (push)
Exactly want I want, I thought. But when I do a push I need to fill in my Username. Why? If I push directly to the url if filled in it works perfectly:
git push https://WouterJ@github.com/WouterJ/project.git master
Works, but
git push github master
Won't work
I also used the git config
to set a different push url:
git config remote.github.pushurl https://WouterJ@github.com/WouterJ/project.git
And if I get the pushurl from the config it looks like it is correct:
$ git config remote.github.pushurl
https://WouterJ@github.com/WouterJ/project.git
Also looking at the .git/config file it looks like everything is correct.
Am I missing something here? Is it a bug? I use Git1.7.4, is that wrong?