问题
As many other, when I use git push I get the next error:
remote: Permission to mmistakes/minimal-mistakes.git denied to MyName. fatal: unable to access 'https://github.com/mmistakes/minimal-mistakes.git/': The requested URL returned error: 403
I´m working in Windows, I have git 2.22. I tried:
- Running the following two commands in the terminal, replacing the obvious things:
git config --global user.name "Your Name Here" git config --global user.email "Your Email Address Here"
This one "How can I change the user on Git Bash?"
Deleting the Windows Credential
Adding a ssh keys to Github
But non of those things work for me.
回答1:
403 is a forbidden error code... so as long as you are sure your git user name and password are accurate, you then must make sure you are an authorized user on the GitHub repo check here for more details on what permission you need.
回答2:
Unless you are mmistakes
on GitHub, you won't be able to push directly to this repository, unless mmistakes
declares you as a collaborator.
Consider forking mmistakes/minimal-mistakes.git, and you will be able to push back (HTTPS or SSH) to said forked repository.
来源:https://stackoverflow.com/questions/56719727/git-push-permission-to-denied-the-requested-url-returned-error-403