Reputation: 931
I created a new branch manually from Xcode, which for some reason did not show up on the repository, so I made another branch from the GitHub browser manually. Then when trying to commit I'm met with the error:
"The remote repository rejected commit. Make sure you have permission to push to the remote repository and try again."
I've talked to my boss who ensured that I'm given written permission, so we're both confused as to why I can't commit properly.
Upvotes: 9
Views: 10683
Reputation: 59526
If you have this option selected in the Email Settings page of GitHub it will prevent you from pushing.
Upvotes: 24
Reputation: 1460
I was using "Personal Access Token" for authentication and was facing the same issue. For some reason, generating a new token and entering it again in Xcode -> Preferences -> Accounts fixed it.
Upvotes: -1
Reputation: 967
You need to go in to terminal, and then go to your project directory and type these commands.
xcrun git config user.name "your username here"
xcrun git config user.email [email protected]
Make sure the user name and emails are the exact ones that you use on github, gitlab etc.
Upvotes: 2