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:
- Git Error: Github:remote: Invalid username or password……
- git commit–fatal: unable to auto-detect email address
- Updates were rejected because the remote contains work that you do
- git:fatal: No configured push destination.
- Git Push hint: Updates were rejected because the remote contains work that you do hint: not have …
- Solution: git uses git push to jump out of remote: permission to a denied to B
- How to Solve error: failed to push some refs to ‘xxxx’
- [Solved] error: failed to push some refs to ‘xxxx’
- Git error: requested URL returned error: 403