Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to submit a pull request as a first time contributor?

Louis Fry-Bouriaux November 19, 2019

I can't create a pull request.

I cloned a repo, made some changes, tested them, created a new local branch, switched to that branch and committed my changes. Then I notified the owner that I would like to push these changes, to which he said send a pull request. So I switch back to master branch and try to push the branch to origin but I am apparently forbidden from doing that (403). If I click on the 'create pull request' button it just says 'we can't let you see this page'.

Am I doing something wrong or do I have to be allowed to do this by the repo owner?

Thanks,

Louis

2 answers

1 accepted

0 votes
Answer accepted
Louis Fry-Bouriaux November 21, 2019

If not part of the development team, one needs to get permission from the repo maintainers to be able to push changes.

Alternatively one can fork the repo, create a branch, add and commit changes. A pull request can then be made to merge this fork into the original repo.

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2019

Hi @Louis Fry-Bouriaux,

Welcome to the Atlassian Community.

To create a pull request you need to push your branch where you made your commits back to Bitbucket. Then log on to Bitbucket to create your pull request to merge your branch into master. Check out Create a pull request to merge your change, and I can also recommend this tutorial, Making a Pull Request

Louis Fry-Bouriaux November 19, 2019

Hi @Mikael Sandberg ,

Thanks for the reply! I can't seem to push the branch however:

After creating the branch, adding and committing changes, then switching back to master from the command line, when I do 'git push origin clabels' where 'clabels' is the branch I created and committed to locally, I get the following:

Screenshot from 2019-11-19 21-02-13.png

What am I doing wrong here? Do I need to push somewhere else first?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2019

The password you are entering is not correct, that is why remote says Forbidden. Make sure you are using the correct password or consider using SSH instead to bypass having to enter username and password.

Louis Fry-Bouriaux November 19, 2019

Hmm, ok but if I deliberately type in a wrong password it says 'Invalid username or password'. SSH doesn't seem to work either. I'm fairly certain I don't have write privileges to the repo.

So I solved it by first forking the repo so that I could push to my version, then make a pull request for the owner to merge it with his master repo. Now the terminology makes more sense to me.

I found no guide to doing this, just a random comment in some stackoverflow question dating back to 2011.

I must still ask just to be sure, is this the only way to make a first contribution to a repo which I don't own and which I am not part of in any way?

Thanks for the assist in any case!

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2019

To contribute to a repository you need to have write permission to it, so if the owner of it does not give you that permission you will not be able to create a pull request.

Like Louis Fry-Bouriaux likes this
Louis Fry-Bouriaux November 20, 2019

Thanks Mikael, should I edit this whole post to maybe make it more helpful to someone else? Like change the title to "How to submit a pull request as a first time contributor?"

Then the answer will make more sense, as my question as it stood could obviously be answered by the documentation you suggested.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events