Git keep asking for my username and password on GitHub

If you’re experiencing this problem maybe you’ve made the checkout with the http or https url, that means that you dont have an authentication method.

For linux or Mac you can solve it with a simple way.

Mac:

    git config --global credential.helper osxkeychain

Linux:

    git config credential.helper cache

Reference for cache options on this link http://git-scm.com/docs/git-credential-cache

If you’re on windows and you’re trying to use cache the cache helper you might have the next message:

    git: 'credential-cache' is not a git command. See 'git --help'.

So in that case you need to setup the ssh connection and change your remote protocol connection from http to ssh. To do that you need run:

    git remote set-url origin git@github.com:username/repo-url-on-github.git

You also need to setup your ssl-key you can do it from the GitHub config https://github.com/settings/ssh . If you don’t know how to generate ssh keys just follow these steps https://help.github.com/articles/generating-ssh-keys .