Git Push Github ERROR: Permission to xxx.git denied to user

Before, my computer’s local git has logged into a GitHub account. Today, I want to change another new GitHub account to submit the project, which is equivalent to using two GitHub accounts on the same computer

So I changed my user name and email first

1 git config --global user.name "Your_username"
2 git config --global user.email "Your_email"

Then create a new warehouse on GitHub, connect with the local warehouse, and finally use git push – U origin master to push to the remote warehouse

User linliquan does not have access to user monkeylucky’s repository javainterview

Finally, a solution is found by searching for information on the Internet

My computer is win7, but the setting method should be almost the same

1. Open the control panel and search the credential manager on the right. You will find that there are in GitHub account

2. Change your user name and password to your new login GitHub account and password 2

re submit: git push – U origin master

It’s done

Similar Posts: