Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Update local code with pull request from private fork without requesting read access to said fork


Hello gang!

Using git


  1. I have a private repo that I shared (read) to John.
  2. John forked the repo, created a branch, pushed it and created a Pull Request for me to review and then merge into my own repo.

What I can do:

  • See his pull request
  • See his changes
  • See a list of his commits
  • Merge his pull request

What I cannot do (but wish I could do):

  • Click one of his commits to see the diff
  • Update my local code to his Pull Request's branch to test his code locally

My solution was to ask John to give me read permissions to his fork and all is working now.

However, this feels like an unnecessary step. If I have access to his changes and can merge them to my repo, why couldn't I pull them to my local code to test them out? Am I missing something?

I searched online but found nothing that didn't assume I already had read permissions on the fork. Please forgive me if the question was already answered elsewhere.

Thank you in advance for your precious help and may this discussion enlighten others as well.

1 answer

1 accepted

0 votes
Answer accepted

Hi Joey and welcome to the community!

In this scenario, did John created the fork under a workspace different than the one that owns the parent repo?

If a repo is owned by e.g. workspace-1 and someone forks it under their personal workspace or any workspace other than workspace-1, we don't automatically give access to the fork to any user of workspace-1. If the fork is owned by a different workspace, e.g. workspace-2, only user groups of workspace-2 will get access automatically (if they are configured for getting access automatically). So, this is a matter of repository ownership.

That being said, I understand the requirement to be able to fetch the PR code locally. This is not possible at the moment without having access to the fork, because PRs are not stored as refs in the destination repo. We have a feature request about this in our issue tracker:

Until this is implemented, a user will need to have access to the fork in order to be able to pull the code of a PR locally.

I also wanted to add here that if
- the repo is owned by workspace-1
- you are an admin of workspace-1, and the admins user group is configured to get access to all new repos in that workspace
- John is a member of a user group of workspace-1 that is allowed to create repos in workspace-1
then John could create their fork under workspace-1, which would give you access to the repo automatically. I just wanted to mention that as a way that would eliminate the step of John giving you access.

Please feel free to let me know if you have any questions.

Kind regards,

Thank you for your answer.

I did what you suggested, giving John permission to create repositories in my workspace.

He then forked the project in my workspace and it worked like a charm.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,228 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you