I have started to contribute to a public repository on GitHub, but after I have created a pull request it says remote: Permission when I am trying to push another code to my origin.
remote: Permission to una/CSSgram.git denied to Pradhvan.
fatal: unable to access 'https://github.com/una/CSSgram.git/': The requested URL returned error: 403
Anyone else having the same problem. The issue would be you had cloned the repo from Github of the owner(here Una's repo) and you are pushing that change directly to the repo. This is the not right way as you don't have permission to push changes to that repo.
The right step would be:
Fork the original repo so you get a copy of it. Url of your forked repo would be something like https://github.com/<your Github username>/<repo_name>
Clone the repo that you just forked.
Create a branch (git checkout -b "MyPatch1"
) and now make the changes to the code.
Push the changes to your fork (git push origin MyPatch1
)
Open Github and go to the owner's repo and you would see a button appear Click the Compare & pull request button.
Congratulation! You have successfully created a pull request.