19 January 2015

Make git never asks for your github username again

A lot of answers in SO advise you to change your repo url after you cloned the project. Don't do it. Don't change your repo url per project. That's a waste of time. Soon you will clone another project and you will have to do it again. Better way is to set the username globally so it applies to all projects from github. Current and future ones. Just type:
git config --global credential."https://github.com".username YOUR_USERNAME
This will add
[credential "https://github.com"]
username = YOUR_USERNAME
to your ~/.gitconfig

0 komentarze :

Post a comment