Jay Taylor's notes
back to listing indexHow to disable Git Credential Manager for Windows?
[web search]- Home
-
- Public
- Stack Overflow
- Tags
- Users
- Jobs
-
- Teams
- Create Team
I notice that in the latest version of Git, the default is now to popup a "Git Credential Manager for Windows" dialog instead of prompting me for me password at the bash prompt every time. I really hate this behaviour. How can I just disable it and go back to entering the password at the bash shell every time?
By the way, I don't want git caching my credentials in any way, whether through Windows credentials or some internal daemon. I want to disable all credential caching.
OK I discovered that you need to either AVOID checking the "Git Credential Manager" checkbox during the Git for Windows installer, or (after installation) run bash shell as Administrator and use git config --edit --system
to remove the helper = manager
line so that it is no longer registered as a credential helper.
For bonus points, use git config --edit --global
and insert:
[core]
askpass =
To disable the OpenSSH credentials popup too.
-
15Thanks for you answer. For me, this was the first time to use the editor. If you want to save changes, hit the escape key and type :wq and hit enter (write/save and quit). – Ben Besuijen Aug 8 '16 at 9:27
-
Many thanks! The credential manager got confused with my work's proxy server and it made working with Sourcetree a nightmare. Disabling it fixed the problem immediately. – Johnny Aug 9 '16 at 18:29
-
1and if :wq doesn't work like my case use ctrl+z for abort and quit but these will probably make multiple backup file to work with later – Adeem Jan 19 '17 at 9:14
-
23
-
1For those using SourceTree make sure that the "system" version of GIT is being used, not the embedded one.
Tools -> Options -> Git
. – Stevanicus May 9 at 11:42
I was able to uninstall the Git Credential Manager for Windows using the uninstall option:
git-credential-manager.exe uninstall
Run this command in C:\Program Files\Git\mingw64\libexec\git-core
-
1This just stalls and after I press ctrl-c, spits out this usage:
git credential [fill|approve|reject]
– ScottN May 3 '17 at 14:20 -
1@ScottN you're running
git-credential.exe
but you need to rungit-credential-manager.exe
. – Aidan Ryan Jan 26 at 12:55
I had had that problem, I've only removed the git-credential-manager.exe from
C:\Program Files\Git\mingw64\libexec\git-core
Another option I had to use with VSTS:
git config credential.modalprompt false --global
You can either: 1. right-click windows button in the bottom-left corner, 2. choose "Computer management" from the menu, 3. then "Services and Applications" -> "Services" 4. find there Credentials manager, 5. change Startup type to Disabled, stop it, Apply and OK
I wanted to use the credential manager for normal use, but I have scripts where I obviously do not want any prompts whatsoever from git.exe
. This is how I invoke git from my scripts:
set GIT_TERMINAL_PROMPT=0
git -c core.askpass= -c credential.helper= <command> ...
This way, the script always sees the "correct" no-prompt setting without having to adapt any configuration.
(git for Windows 2.13.3)
A variation I found that might also come in handy is to set:
set GCM_INTERACTIVE=never
# or: git config --global credential.interactive never
set GIT_TERMINAL_PROMPT=0
git.exe -c core.askpass= -c credential.helper=manager <command> ...
But note that git.exe -c credential.interactive=never <command> ...
does NOT work (seems that -c
thing isn't routed through to Git-Credential-Manager-for-Windows or whatever).
That way, you can use the GCMfW, but it will never prompt you, it will just lookup the credentials, which can be very helpful in non-interactive environs.
and if :wq doesn't work like my case use ctrl+z for abort and quit but these will probably make multiple backup file to work with later – Adeem Jan 19 at 9:14
Also be sure to run Git as Administrator! Otherwise the file won't be saved (in my case).
For me didn't work:
C:\Program Files\Git\mingw64\libexec\git-core
git-credential-manager.exe uninstall
Looking for Git installation(s)...
C:\Program Files\Git
Updated your /etc/gitconfig [git config --system]
Updated your ~/.gitconfig [git config --global]
Removing from 'C:\Program Files\Git'.
removal failed. U_U
Press any key to continue...
But with --force flag worked:
C:\Program Files\Git\mingw64\libexec\git-core
git credential-manager uninstall --force
08:21:42.537616 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
e
08:21:42.538616 git.c:576 trace: exec: git-credential-manager uninstall --force
08:21:42.538616 run-command.c:640 trace: run_command: git-credential-manager uninstall --force
Looking for Git installation(s)...
C:\Program Files\Git
Updated your /etc/gitconfig [git config --system]
Updated your ~/.gitconfig [git config --global]
Success! Git Credential Manager for Windows was removed! ^_^
Press any key to continue...
I could see that trace after I run:
set git_trace=1
Also I added the git username:
git config --global credential.username myGitUsername
Then:
C:\Program Files\Git\mingw64\libexec\git-core
git config --global credential.helper manager
In the end I put this command:
git config --global credential.modalPrompt false
I check if ssh agent is running - open a bash window to run this command
eval "$(ssh-agent -s)"
Then in the computer users/yourName folder where is .ssh Add connection(still in bash)
ssh-add .ssh/id_rsa
or
ssh-add ~/.ssh/id_rsa(if you are not in that folder)
I checked all the settings that I add above:
C:\Program Files\Git\mingw64\libexec\git-core
git config --list
09:41:28.915183 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-cor
e
09:41:28.917182 git.c:344 trace: built-in: git config --list
09:41:28.918181 run-command.c:640 trace: run_command: unset GIT_PAGER_IN_USE; LESS=FRX LV=-c less
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
credential.modalprompt=false
credential.username=myGitUsername
And when I did git push
again only for the first time I had to add username and pass.
git push
Please enter your GitHub credentials for https://myGithubUsername@github.com/
username: myGithubUsername
password: *************
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 316 bytes | 316.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
Since than on git push
I don't have anymore the message to enter my git credentials.
D:\projects\react-redux\myProject (master -> origin) (budget@1.0.0)
λ git push
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 314 bytes | 314.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/myGitUsername/myProject.git
8d38b18..f442d74 master -> master
After these settings I received an email too with the message:
A personal access token (git: https://myGitHubUsername@github.com/
on LAP0110 at 25-Jun-2018 09:22) with gist and repo scopes was recently added
to your account. Visit https://github.com/settings/tokens for more information.
I put this because for me worked. I hope this will help others, too.
Your Answer
Not the answer you're looking for? Browse other questions tagged git bash or ask your own question.
asked |
2 years, 1 month ago |
viewed |
46,805 times |
active |
Linked
Related
Hot Network Questions
-
Combining Columns QGIS Attribute Table
-
Hackerrank Day 8: Dictionaries and Maps solution in C++
-
Difference between "amiable" and "amicable"
-
Why do scientists think that all the laws of physics that apply in our galaxy apply in other galaxies?
-
How would primitive peoples detect radiation?
-
On The Range Of A Function
-
Does hiding under a bedsheet provide Total Cover by a strict RAW reading?
-
Do native speakers use 'so-so'?
-
How to admit I don't know something without making myself look incompetent?
-
The foot feels the foot when it feels the ground
-
Acknowledged for nonexistent contribution?
-
How to make a 6 year old think more?
-
Did Russian winter seriously contribute to German defeat on the Eastern Front in WWII?
-
Why isn't encoding the names of arguments in function names more common?
-
Why does dividing both sides of this system of equations to each other yields infinite "incorrect solutions"?
-
Quarantine period for a new alien civilization found
-
An incident happened at school and child didn't (want to) tell the parent
-
Why are PRNG in programming languages not cryptographically secure by default?
-
Is Muhammad one of the most popular names for boys in England and Wales?
-
Microsoft Office starts "configuration setup" every time I start WORD/EXCEL
-
Why did Euler consider the zeta function?
-
Words with "bi-" prefix that no longer mean "two"
-
Is my D&D 5e Homebrew Race Balanced?
-
Does toddler need a helmet inside a bicycle trailer?
site design / logo © 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. rev 2018.6.30.30919