Git-credential-manager-for-windows: Can't uninstall the Git Credential Manager

Created on 17 Mar 2016  路  15Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

In Win10, clicking the Uninstall button has no effect

image

Also, trying to configure git to use the wincred credential helper doesn't work either:

> git config credential.helper
manager
> git config credential.helper wincred
git config credential.helper
wincred

Yet when I try to push, I still get the Credential Manager popup dialog.

Most helpful comment

Sorry to post on a closed issue but I think I have this figured out...

C:\Program Files\Git\mingw64\etc\gitconfig contains the system-level config. That is where I found the credential.helper=manager that was causing the prompt to persist despite any of the other stuff mentioned here. For reference I am on Win10 x64 with Git for Windows 2.9.0.

I guess the two fixes would be:

  • What I did, open that system gitconfig in an elevated text editor and nuke its contents, magically no more prompt!
  • Theoretically, you could run Git Bash elevated and do git config --system --unset credential.helper manager

Again, apologies if this buzzed everyone for no good reason.

All 15 comments

Which version of Git for Windows are you using?

If it is 2.7.3, the GCM was recently included in its installer - there maybe some issues there.

Also, you should note that the git config credential.helper value is not exclusive, you can correctly have more than a single value. To remove a credential helper, you'd need to use git config unset credential.helper manager then set a new value.

Is this in relation to https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/151 ? If so, I think you maybe misunderstanding the modal dialog's request. It is asking for username + password, followed by your authentication app code.

Use of a second factor should have been something that you configured (good choice!) for your account.

Interesting, uninstalling the GCM works for me.

Windows 10 Enterprise (64-bit) Version 1511 (OS Build 10586.164)

My config even lacks the credential.helper entries after uninstall.

core.symlinks=false
core.autocrlf=false
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
branch.autosetupmerge=always
branch.autosetuprebase=always
user.name=<user_name>
user.email=<user_email>
push.default=simple
credential.writelog=true
core.editor="C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -nosession -noPlugin $@
core.preloadindex=true
core.fscache=true
alias.edit=!f() { "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -nosession -noPlugin $@; }; f
alias.logi=!f() { git log --oneline --decorate --first-parent -30 $@; }; f
alias.logx=!f() { git log --oneline --decorate --graph -30 $@; }; f
alias.get=!f() { git fetch -np $@; }; f
alias.pick=!f() { git cherry-pick $@; }; f
alias.nuke=!f() { git clean -xdf; git reset --hard HEAD; }; f
alias.optimize=!f() { git repack -Adf --depth=256 --window=64 --write-bitmap-index --max-pack-size 2g; git prune; }; f
alias.sweep=!f() { git branch --merged | grep -v 'master' | grep -v '\*' | (xargs -n 1 git branch -d 2>/dev/null); git repack --max-pack-size=2g; git prune; }; f
alias.unsafe=!f() { git config --global http.proxy 127.0.0.1:8888; git config --global http.sslVerify false; printf 'unsafe injection *enabled* for Fiddler tracing.
'; }; f
alias.resafe=!f() { git config --global --unset http.proxy; git config --global --unset http.sslVerify; printf 'unsafe injection *disabled* for Fiddler tracing.
'; }; f
gc.auto=256
gc.refs/remotes/*.reflogexpire=7 days
gc.refs/remotes/*.reflogexpireunreachable=2 days
fetch.prune=true
status.relativepaths=false
filter.lfs.clean=git-lfs clean %f
filter.lfs.smudge=git-lfs smudge %f
filter.lfs.required=true
diff.tool=p4merge
difftool.prompt=false
difftool.p4merge.cmd="C:/Program Files/Perforce/p4merge.exe" $LOCAL $REMOTE
difftool.p4merge.keepbackup=false
difftool.p4merge.keeptemporaries=false
difftool.p4merge.trustexitcode=false
merge.tool=p4merge
mergetool.p4merge.cmd="C:/Program Files/Perforce/p4merge.exe" $BASE $LOCAL $REMOTE $MERGED
mergetool.p4merge.keepbackup=false
mergetool.p4merge.keeptemporaries=false
mergetool.p4merge.trustexitcode=false
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=https://github.com/Microsoft/Git-Credential-Manager-for-Windows.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.pushurl=https://github.com/whoisj/Git-Credential-Manager-for-Windows.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.master.rebase=true
credential.modalprompt=true
branch.fix-ghmodal-ux.remote=origin
branch.fix-ghmodal-ux.merge=refs/heads/fix-ghmodal-ux
branch.fix-ghmodal-ux.rebase=true

I have Git for Windows 2.7.0 also installed. Are there logs I can share to perhaps help diagnose why uninstall isn't working for me?

image

I'm not even seeing it in the list of apps & features.
It is breaking my use of SSH Agent

I have git 2.8.1 and GCM is not showing up in unistall etc.

Ah if it came as part of the Git for Windows installation, then you need to uninstall Git for Windows to remove it. For better, or for worse, Git for Windows doesn't run the GCM's installer as a coinstaller, it simply bin places (aka xcopy) the files into the correct location and updates the git config.

@whoisj ah, OK, thanks.

I'm going to chalk this up to the Git for Windows installation getting in the way.

I've tested uninstalling the GCM on Windows 7 32 & 64, Windows 8 32 & 64, and Windows 10 32 & 64. as well as Server 2012 R2 64. In all cases it just worked, unless it was installed by Git for Windows as well.

Ok, I guess they may be taking the view it's part of G4w. Though the ''as well' bit I'd not good.

For my part the desire to uninstall it went away once I realised it is for https only and I wanted shh! Doh!

Simple notes (specially for beginners):
Remove the "manager" credential using:
git config --unset credential.helper manager
Give a look to check whether you have another credential helper (and remove them too) on config using _git config --list_

Sorry to post on a closed issue but I think I have this figured out...

C:\Program Files\Git\mingw64\etc\gitconfig contains the system-level config. That is where I found the credential.helper=manager that was causing the prompt to persist despite any of the other stuff mentioned here. For reference I am on Win10 x64 with Git for Windows 2.9.0.

I guess the two fixes would be:

  • What I did, open that system gitconfig in an elevated text editor and nuke its contents, magically no more prompt!
  • Theoretically, you could run Git Bash elevated and do git config --system --unset credential.helper manager

Again, apologies if this buzzed everyone for no good reason.

@ayan4m1 thanks for that.

In theory the GCM should take of this on its own, but if it is not then I'll deep dive the code to see where we're failing. :smile:

@ayan4m1 Thank you! it's solved this annoying issue. Amazingly correct username and pass did not work with the GCM, and when removed like you said, everything works. Thanks!

@ayan4m1 thank you so much...I tried everything but manually deleting credential.helper=manager in the main .gitconfig file which finally worked. Of course had to use admin in Windows to save the Notepad++ edited file. Git bash for Windows lol...basically have to do everything in elevated for it to work. :)

Thanks! This is very helpful. Below are the commands that I used to fix the issue.

  1. Check if you're using credential.helper=manager or wincred
    git config --list
  2. Add windcred if it's not present
    git config --global credential.helper=wincred
  3. You'll end up having two credential helpers. Delete the manager one
    git config --system --unset credential.helper manager

If you want to see the traces
set git_trace=1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thedavidscherer picture thedavidscherer  路  21Comments

ddfridley picture ddfridley  路  25Comments

VasuInukollu picture VasuInukollu  路  25Comments

garretwilson picture garretwilson  路  35Comments

coyot picture coyot  路  45Comments