Can't access Bitbucket team repositories - master does not exist or you do not have permission

I tried following the Netflix documentation - using an SSH key to connect to the repository. Also generated an “app password” from Bitbucket but it never worked.

The repos can be accessed when in my company’s network or via VPN. Could this be the reason Netlify cannot access the repositories?


Same here. I verified that Netlify can access my private, non-team repos but it can’t see my team repos even though I have admin access to them.

Certainly we won’t be able to access repos using your VPN, @kiko but I am pretty sure that’s not what you meant. We connect from random IP addresses, so support for that at your bitbucket host (is that or do you self host?) is required if you want us to connect.

Hey Dustin! What do you mean by “access”? We require administrative access, not just ability to see them. This is so we can install a webhook and deploy key…

Hi, I’m curious which documentation you have found on this, as I’m in the same boat:

I have admin access to a repository from our organisation, hence the repo is not mine, and not listed in the list of my repositories when logged in on bitbucket. Consequently, Netlify can’t find the repo to hook up to.

Are there pointers to how we should go about this scenario? Can we install the webhook and deploy key in any way manually on bitbucket?

hmm, that is a good question. I’ll reach out to the docs team to see if we can get more information on that. :muscle:

  • While creating a new site from Git I chosen BitBucket;
  • BitBucket authorized without any confirmation questions and offered me a list of my personal repos;
  • I wanted to deploy a repo that is not owned by me, but I have admin access to it. It is not listed there.
1 Like

hmm, interesting.

Could you do me a favour and review this thread, and let us know whether this is the same issue?

@JesusCrow have you tried clicking on the BitBucket username when adding a site to select another team’s repos to list? I’ve attached an image with that selector highlighted.

I don’t use VPN, but it sounds like a similar issue.
It would probably be fixed if I could just re-authorize BitBucket to Netlify. Yesterday when I tried to create a new site, BitBucket skipped authorization (permissions request window), so I think that it could be a problem with not enough permissions given some time ago (i.e. when I tried Netlify half a year ago and I didn’t want to allow it to see everything on my BitBucket account so I only gave permissions for personal repos). At least that’s my guess atm.

I got scared for a moment that I didn’t notice it :smiley:
I just checked again, there is no selector at the marked place.

Yes, both of them are the same issue. We’re facing it too.

If you’re not the admin of the team, you can’t see any repositories under that team (even if you are admin of some of the repositories under that team).

N.B.: Doesn’t help even if you reauthorize your Netlify account with Bitbucket.

1 Like

That is how it is supposed to work. Only team admins can do the operations needed - adding deploy keys and webhooks to a repo. Sorry I don’t have better news for you, but you can of course use the CLI to link with the team admin’s help:

I also have this issue with accessing team repositories from Bitbucket.
Repository admins are able to add deploy keys and webhooks, without needing to be a team admin. Mandating the need to be a bitbucket team admin to configure all sites is infeasible.

Interesting, do you have a link to their API or permission docs that show this? It is contrary to our experience and is why we have “gated” the feature like this.

I think the issue is the distinction between the concept of team admins and repository admins in Bitbucket.
I have never been a team admin with my current company - only a team member/contributor. Previously in Netlify I have been able to provision sites where I was an administrator of the team’s repository but not a team admin (this was working at least a month ago). I don’t believe the Bitbucket API has changed since then.

I’d imagine you’d want to look for a user’s teams in bitbucket where their role is a ‘member’ and then find the team’s repositories where the user has the role of ‘admin’.

This link mentions how repository admins can create webhooks.

Thanks for those details, Henry! I’ve gotten a feature request filed as I have confirmed it affects others in your situation as well. In the meantime, your options are:

  • as I mentioned use the CLI
  • have the team admin use the UI (though you’d have to invite them to your Netlify team)
  • try using the API: [Common Issue] Linking a repository via API which may allow you to self serve (please let me know if you do try this and it works or fails!)
1 Like

Thanks for the update. As you suggest, the best option currently will be to use the CLI.

1 Like

Same issue here as well.

noted, @gyrad. Sorry for the inconvenience. Have you tried using the CLI?