Quantcast
Channel: Remove credentials from Git - Stack Overflow
Viewing all articles
Browse latest Browse all 44

Answer by Tahir Khalid for Remove credentials from Git

$
0
0

Using latest version of git for Windows on Windows 10 Professional and I had a similar issue whereby I have two different GitHub accounts and also a Bitbucket account so things got a bit confusing for VS2017, git extensions and git bash.

I first checked how git was handling my credentials with this command (run git bash with elevated commands or you get errors):

git config --list

I found the entry Credential Manager so I clicked on the START button > typed Credential Manager to and left-clicked on the credential manager yell safe icon which launched the app. I then clicked on the Windows Credentials tabs and found the entry for my current git account which happened to be Bitbucket so I deleted this account.

But this didn't do the trick so the next step was to unset the credentials and I did this from the repository directory on my laptop that contains the GitHub project I am trying to push to the remote. I typed the following command:

git config --system --unset credential.helper

Then I did a git push and I was prompted for a GitHub username which I entered (the correct one I needed) and then the associated password and everything got pushed correctly.

I am not sure how much of an issue this is going forward most people probably work off the one repo but I have to work across several and using different providers so may encounter this issue again.


Viewing all articles
Browse latest Browse all 44


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>