How to save your git password in the Mac OSX keychain

Are you tired of constantly having to enter your Git password all the time? Here’s how to make life much easier for you by saving the git password in the Mac OSX keychain.

In order to not having enter your git based password every time you perform a git operation, here’s how you can store the git password in the Mac OSX keychain:

Check if you have the credential-osxkeychain helper already installed:

git credential-osxkeychain

If not, the download and install it:

curl -o git-credential-osxkeychain
sudo mv git-credential-osxkeychain /usr/local/bin
sudo chmod u+x /usr/local/bin/git-credential-osxkeychain

And make git use the helper:

git config --global credential.helper osxkeychain