Windows system about git push failure solution

git push is unsuccessful in the future and shows git push --set-upstream origin dev At this time copy the above git push --set-upstream origin dev execution if the error at this time is only: $ git push --set-upstream origin devLogon failed, use ctrl+c to cancel basic credential prompt. Solution:

 

Log in to gitHub in the browser, click on the setting --> Developer settings --> Personal access tokens page on the avatar in the upper right corner 

After the new creation is completed, the page already has a new token. Do not move this page or copy it out first. After the page is refreshed, the token will be invisible.

 

Go back to git bash and continue to submit. At this time, a pop-up window will appear to enter the username username (this time you enter your GitHub username). After success, enter the password (the password is the password used to log in to gitHub). If it fails, it will prompt: $ git push --set-upstream origin devLogon failed, use ctrl+c to cancel basic credential prompt.remote: Invalid username or password.fatal: Authentication failed for ' https://github.com/ ***My The prompt is that the username and password are incorrect (remote: Invalid username or password)

If there are two errors, you will be prompted to enter your account in git bash, and then a password box will pop up, this is also to enter the token

In short, the account is still to enter your own git account and password. After the second time, the token can be successfully pushed.

Guess you like

Origin blog.csdn.net/qq_34194159/article/details/114143201