What access permission is needed to create a Pull Request to public repositories? #22665
-
What permission do we need to send a PR to public repositories which we have only read access? Only read or need write as well? These two statements look conflicting to me. Creating a pull request - GitHub Docs
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hello. 👋 That means you need to have write access to open a pull request and change the code directly in that public repository, which I something I don’t think GitHub offers for security reasons. To contribute to a public repository you will have to fork that repository, creating your version which you will have write access to, write to that version, and then send a pull request from that version back to the original repository. That’s how you usually go about it, but look out for CONTRIBUTING.md, LICENSE, and, or, CODE_OF_CONDUCT.md files, if a repository has those you should read them first before submitting any pull request to make sure you’ve followed all the necessary steps they require for a pull request, and you should read the README.md too but that’s in the name so. 🙂 Do keep in mind that if a repository doesn’t have a LICENSE, even if it’s visible and public, it’s not considered open-source since it doesn’t have a LICENSE, in that case, I would suggest opening an issue or contacting the owner directly and asking for permission to contribute or asking them for a license. If you have a public repository and want to give write access to a contributor to edit code directly on the repository you can invite them under Hope that helped. 😀 |
Beta Was this translation helpful? Give feedback.
-
Thank you thinkverse. It’s very clear now.
It turned out that a fork is automatically created and any of my local branches are set up to track the fork, instead of the original repo.
I also appreciate the detailed explanation on the documentations. It’s of great help :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
ryosuketc:
Correct, that is in fact how the
I’m glad I could help, good luck with your journey. 👍 |
Beta Was this translation helpful? Give feedback.
-
Thank you! It’ clear now. |
Beta Was this translation helpful? Give feedback.
-
Glad I could help, if one post helped you solved it, please mark it as the solution, it will help people looking around for the same issue in the future. 🙂 |
Beta Was this translation helpful? Give feedback.
Hello. 👋
That means you need to have write access to open a pull request and change the code directly in that public repository, which I something I don’t think GitHub offers for security reasons.
To contribute to a public repository you will have to fork that repository, creating your version which you will have write access to, write to that version, and then send a pull request from that version back to the original repository.
That’s how you usually go about it, but look out for CONTRIBUTING.md, LICENSE, and, or, CODE_OF_CONDUCT.md files, if a repository has those you should read them first before submitting any pull request to make sure you’ve followed all the necessary steps they re…