Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make Git ask for a username and password every time I push?

Tags:

Where I work many people use the same computer on the same account. We now use the shell instead of the GUI just for convenience.

The first time someone committed it asked for their username and password, but after that just used their account for all commits. I'm sorry that I don't know much about the shell, but this is the first time I'm using it. The commands I use to commit and synchronize are:

git commit -a git push origin [branch name here] 
like image 587
Joshua Johnson Avatar asked Sep 09 '14 02:09

Joshua Johnson


People also ask

Why does Git not ask for password?

The most likely reason for this is that Git has been configured to use a credential helper. The configuration could have been made a) for all users in your system b) only for your user c) for a specific repository.

Why is Git asking for username and password every time?

If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository. Using an HTTPS remote URL has some advantages compared with using SSH.


1 Answers

If you use a Windows system, the Git username and password is stored in a control panel. You can go to Control PanelUser AccountsCredential Manager:Generic Credentials to delete it.

Enter image description here

like image 90
haiwuxing Avatar answered Sep 28 '22 20:09

haiwuxing