Git always pops up the git login popup question

When using webstrom's git plugin

Every time you submit the local code to the remote, you will always be asked to enter your account and password: git push or git pull and the following interface will pop up:

 

Enter the account number and password, it is clearly correct, but the prompt login failed: Logon failed, use ctrl+c to cancel basic credential prompt.

This login box will pop up: it is because it has been executed: git config --global credential.helper manager this command.

You can check: git config --list:

1、使用 git config --system --unset credential.helper,或者 git config --global --unset credential.helper

Solve the problem of popping up the login box, and then solve the problem of having to enter the password every time: execute git config --global credential.helper store / git config --system credential.helper store (after this command is executed, it will ask for the first Enter the password twice, and the account and password will be cached in the .git-credentials file, so there is no need to enter the account password in the future)

Continue to view: git config --list

It is found that the manager no longer exists and has become a store. You can check whether there is a .git-credentials file in your user directory and save your account and password at the same time.

Check and find that the corresponding file is indeed generated, and the account and password are saved

$ cat ~/.git-credentials

If the following error occurs: you can delete the file ~/.git-credentials and re-enter the password.

$ git push origin master
remote: Invalid username or password.fatal: Authentication failed for

Guess you like

Origin blog.csdn.net/weixin_40013817/article/details/113709462
Git