How to make git request username and password every time I click?

Where I work, many people use the same computer in the same account. Now we use the shell instead of ui for convenience only. The first time someone did this, he asked for their username and password, but after that he simply used his account for all commits. I'm sorry that I know little about the shell, but this is the first time I use it. The commands I use to commit and synchronize are as follows.

git commit -a git push origin [branch name here] 

thanks for the help

+7
git github passwords username
source share
2 answers

It seems that user credentials are cached.

Go to your project, open .git/config and delete the lines

 [credential] helper = store # or helper=cache 

Learn more about git-credential-store .

+2
source share

If you are using Windows, the git username and password are stored in the control panel, you can go to "Control Panel"> "User Accounts"> "Credential Manager: General Credentials" to delete it. enter image description here

+6
source share

All Articles