disable git credential-osxkeychain

To help track down the setting, I'd try to use:

git config --local credential.helper
git config --global credential.helper
git config --system credential.helper

The first one checks the local repo config, the second is your ~/.gitconfig, and the third is based on where git is installed. Depending on which one comes back showing the credential helper, you can try using the equivalent --unset option:

git config --local --unset credential.helper
git config --global --unset credential.helper
git config --system --unset credential.helper

The last one may not work if you don't have proper permissions. So you may need to run the last one under sudo for it to work correctly. FWIW, you may have installed for the pre-built git images for Mac OS X. If you cat /usr/local/git/etc/gitconfig (or /usr/local/etc/gitconfig if you installed git via Homebrew or a building locally), you'll see that it does set up the credential helper for you. So the last command above would help fix that problem.


The other answers were very helpful. The credential.helper didn't show for me in any of the listings (specifying --local, --global, etc) and it always showed on a 'git config -l'. Using the --show-origin command showed that it was coming from an OS X-specific file.

$ git config --show-origin --get credential.helper
file:/Applications/Xcode.app/Contents/Developer/usr/share/git-core/gitconfig    osxkeychain

The config itself (git config --unset credential.helper) isn't enough.
Make sure to kill any git-credential-osxkeychain process (as described here) as well, or see if the issue persists after a reboot.

Also, when using GitHub for Mac, check if there is a config used internally by this tool.
Remember that git config alone will check for system, global and local config file.

Note: with git 2.9, you can simply set the credential.helper to "empty string" in order to disable it: see "How do I disable git's credential helper for a single repository?".

Tags:

Git

Github