Skip to content

Instantly share code, notes, and snippets.

@MilesDowe
Last active October 7, 2020 14:19
Show Gist options
  • Save MilesDowe/7fb7a6d0f6f29915d6ccafcc4e1a4ba8 to your computer and use it in GitHub Desktop.
Save MilesDowe/7fb7a6d0f6f29915d6ccafcc4e1a4ba8 to your computer and use it in GitHub Desktop.
Git Credential Manager for Windows kept popping up, ignoring my preferences.

Git installed by Scoop wouldn't use GCM configs in home directory

Updated Git via scoop. GCM popup always appeared, never saving my preferences or bothering to use my store.

TL;DR: The Git distribution had a config file overriding mine under <scoop_home>/apps/git/current/etc/gitconfig. I deleted it and the problem was fixed.

Ran:

setx GIT_TRACE %userprofile%\git.log
setx GCM_TRACE %userprofile%\git.log

(Windows tip: Can view above environment variables under regedit -> current user -> Environment for when you want to remove them.)

Read log, saw:

10:26:20.332805 run-command.c:663       trace: run_command: 'git credential-helper-selector get'
10:26:20.400985 exec-cmd.c:237          trace: resolved executable dir: C:/Users/mdowe/scoop/apps/git/2.28.0.windows.1/mingw64/libexec/git-core
10:26:20.402991 git.c:704               trace: exec: git-credential-helper-selector get
10:26:20.402991 run-command.c:663       trace: run_command: git-credential-helper-selector get
10:26:20.461147 exec-cmd.c:237          trace: resolved executable dir: C:/Users/mdowe/scoop/apps/git/2.28.0.windows.1/mingw64/libexec/git-core
10:26:20.464655 git.c:444               trace: built-in: git config credential.helperselector.selected
10:26:20.510778 exec-cmd.c:237          trace: resolved executable dir: C:/Users/mdowe/scoop/apps/git/2.28.0.windows.1/mingw64/libexec/git-core
10:26:20.513285 git.c:444               trace: built-in: git config --show-origin credential.helper
10:26:20.556929 exec-cmd.c:237          trace: resolved executable dir: C:/Users/mdowe/scoop/apps/git/2.28.0.windows.1/mingw64/libexec/git-core
10:26:20.559408 git.c:444               trace: built-in: git config --system -e
10:26:20.560442 run-command.c:663       trace: run_command: echo C:/Users/mdowe/scoop/apps/git/2.28.0.windows.1/etc/gitconfig

Saw a conflicting helper config. Didn't want this config file, so removed it.

@xkix
Copy link

xkix commented Oct 7, 2020

you saved me, thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment