Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I sign out in the Git Bash console in Windows?

I'm using Git, on Windows, version 2.9.2.windows.1.

I work on a repository project and when I do a push, it asked me to enter my GitHub username and password. I entered both my GitHub username and password to update the project.

In my next push, it doesn't ask for my username and password any more. All my modifications for the project are updated.

It looks like my username and password are "saved". How do I "unsave" them?

How do I sign out?

I tried

git config --global --unset user.name git config --global --unset user.email git config --global --unset credential.helper 

But they do not make me sign out.

I want to clear my sign in so the next time I make a push, it asks me again to enter my username and password.

like image 767
Lord Rixuel Avatar asked Jul 24 '16 07:07

Lord Rixuel


People also ask

How do I close git bash editor in Windows?

Type :wq to save and exit the editor. Hit enter to return to the normal terminal window.

How do I login as a different user in git bash?

For Windows User: Follow Instructions: Control Panel >> User Account >> Credential Manager >> Windows Credential >> Generic Credential You can change git credential click modify>>provide uname and password Or you can remove git credential. next time when you'll push repo it'll ask you for credential.


1 Answers

For Windows 10, if your PC has a different login (a MSFT account) and GitHub is on another login, if you go to control panel → user accounts and search for credential manager, you will see "Web Credentials" and "Windows credentials".

GitHub seems to be taking the default ID that is registered in the PC (Microsoft account). Under Windows Credentials, remove the GitHub login details and try Push again. You will be prompted for a GitHub ID and password explicitly. Once we login that gets stored as a personal access token for Git push.

GitHub credentials

like image 128
karthick krishnan Avatar answered Oct 06 '22 08:10

karthick krishnan