Search code examples
gitgit-config

Where Is This Git Setting Coming From?


I am trying to find where each of these credential.helper values are set.

I listed all of my config and filtered on the value I was looking for and it looks like two conflicting values are being set. I want to keep the timeout version and remove the keychain version

Alexs-MacBook-Pro:tinker alexthomas$ git config --list |grep credential.helper
credential.helper=osxkeychain
credential.helper=cache --timeout=300

I looked in the global config and it was not there

Alexs-MacBook-Pro:tinker alexthomas$ git config --list --global |grep credential.helper
credential.helper=cache --timeout=300

I looked in the local config and it was not there

Alexs-MacBook-Pro:tinker alexthomas$ git config --list --local |grep credential.helper

The system config file does not even exist.

Alexs-MacBook-Pro:tinker alexthomas$ git config --list --system |grep credential.helper
fatal: unable to read config file '/etc/gitconfig': No such file or directory

So where is the keychain version coming from and how do I delete it?


Solution

  • You can run git config -l --show-origin to show where each setting is set. The osxkeychain helper is enabled by default on Homebrew's Git, but can be disabled. I don't know whether it ships enabled and if so, if it's possible to disable it, on Apple's Git.