Remember github password

Insert the Github credentials for every pull or push is a little annoying, that happens when the repository was cloned with HTTPS.

On github we found the solution to this problem.

Important install Git version 1.7.10 or later because it has the helper. By default the helper store the password 15 minutes on Linux.

Mac OS X:

git config --global credential.helper osxkeychain

If you installed git with homebrew osxkeychain is already install, the command to try the helper is below:

$ git credential-osxkeychain
usage: git credential-osxkeychain <get|store|erase>

If the helper is not installed you can use the command bellow:

$ curl -s -O https://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
$ chmod u+x git-credential-osxkeychain
$ sudo mv git-credential-osxkeychain "$(dirname $(which git))/git-credential-osxkeychain"

Windows

git config --global credential.helper wincred

Linux:

git config --global credential.helper cache

To change the caching time you can use the command below:

git config --global credential.helper 'cache --timeout=3600'

3600 is the time in seconds and is equal to one hour.