On Mac if you have the latest version of git, you can use following command to tell git to use OS X keychain.
git config --global credential.helper osxkeychain
Note that the credential helper only works with HTTPS requests.
git config --global credential.helper osxkeychain
Note that the credential helper only works with HTTPS requests.