Git bash asked for my username and password and I incorrectly entered my password on accident. It won't prompt me again for my user name and password so I can't do any git commands. Is there a command I can use to have it prompt me for the username and password again.
Asked
Active
Viewed 3,959 times
1 Answers
0
If you are working with https, you need to remove that URL from the credential storage you are using.
See:
- "Managing Remotes / Updating credentials from the OSX Keychain Updating credentials from the OSX Keychain", if you are on MacOS
"Windows Credential Helper" for Windows (for command-line: "How to sign out in Git Bash console in Windows?")
git credential-manager reject <url>

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
I'm on Windows. How would I know if I'm working with https? Also what is the URL in the
: git credential-manager reject – Anna Jan 16 '19 at 20:23 -
@Anna By typing `git remote -v` in your repo. If the origin URL starts with `https://aserver/auser/arepo`, you are using an https URL. Then the command would be `git credential-manager reject https://aserver` (but you can also remove it through the GUI: https://stackoverflow.com/a/53493376/6309) – VonC Jan 16 '19 at 21:33
-
when I type `git remote -v` it shows this: `origin https://github.ncsu.edu/engr-csc326-spring2019/csc326-OBP-204-7.git (push)`. This would be a https URL, right? – Anna Jan 16 '19 at 22:10
-
@Anna yes, the one with the wrong credentials cached. – VonC Jan 16 '19 at 22:41