Bitbucket: "You may not have access to this repository or it no longer exists in this workspace."
Bitbucket Cloud gives this answer both when the repository is not there and when the account that asked may not see it, and it does not say which. With git and an API token, check the user name first: git needs your Bitbucket username (or x-bitbucket-api-token-auth), while the REST API needs your Atlassian account e-mail.
The whole answer
What api.bitbucket.org answered on October 24, 2026, with no credentials, to a repository name that does not exist in a real public workspace. A workspace that does not exist got the same answer:
curl https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>
HTTP 404
{"type": "error", "error": {"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}}
From git, as public reports from 2022 to October 2026 quote it, the same sentence comes on a remote: line, followed by one of three lines:
remote: You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated. fatal: Authentication failed for 'https://bitbucket.org/<workspace>/<repository>.git/'
or fatal: repository 'https://bitbucket.org/<workspace>/<repository>/' not found (for example a Go module whose Bitbucket repository was removed), or over SSH fatal: Could not read from remote repository.
What else we saw on October 24:
- Case and
.gitare not the cause. A real public repository answered the API with HTTP 200 with its name in capitals and with.giton the end, andgit ls-remotelisted its branches without credentials in either form. - git without credentials asks for a user name instead. For the missing name,
bitbucket.organswered git with HTTP 401 andWWW-Authenticate: Basic, so git asked for a user name and never showed the sentence. A wrong name can therefore look like a sign-in prompt. - A made-up token gets the same two lines. On October 29, git with a made-up API token, under
x-bitbucket-api-token-author under a user name, got HTTP 401 with this sentence as the body for a repository that does not exist, and then printedfatal: Authentication failed for …. From git, a wrong token and a wrong URL look the same.
To see which repository was asked for: Pull Request Inbox for Bitbucket, a plugin for JetBrains IDEs, names the repository it asked for when Bitbucket answers 404, and reads the workspace and repository from your git remote, so the git user name does not matter.
Check, in this order
- The git user name. Atlassian's Using API tokens: for git over HTTPS, use your Bitbucket username (in your Bitbucket profile settings; it is case-sensitive) or the fixed name
x-bitbucket-api-token-auth, with the API token as the password. Your Atlassian account e-mail is for the REST API. In public reports with this sentence, git was given the e-mail address orgitas the user name. To change it for a clone:git remote set-url origin https://x-bitbucket-api-token-auth@bitbucket.org/<workspace>/<repository>.git
The next git command asks for the password: paste the API token. If your credential helper still holds an old entry forbitbucket.org, remove it first, or git keeps sending it. - The token itself. Ask the REST API about a public repository with your Atlassian account e-mail and the token:
curl -u <e-mail>:<API token> https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-connect-js
HTTP 401 with an empty body means Bitbucket did not take the e-mail and token at all: a made-up token got exactly that on October 29, although the repository is public. Make a new API token. Any other answer means Bitbucket took the token, and the cause is in the other steps. - The token's scopes. Atlassian lists
read:repository:bitbucketfor cloning, and alsowrite:repository:bitbucketfor pushing. When the REST API names missing scopes instead, see which scope is missing. - The workspace and repository in the URL. They are the two parts after
bitbucket.org/. The workspace part is the workspace ID, which can differ from the workspace's display name. When in doubt, copy the URL again from the repository's Clone button. - What the account may see. Open the repository URL in the browser while signed in as that account. If you cannot see it there, ask an administrator of the workspace or the repository to give the account access.
- Removed or renamed. A repository that was deleted gets the same answer. Old Go modules and package URLs that point at Bitbucket repositories removed years ago are a common case in the reports.
App passwords were removed on July 28, 2026 and fail differently, with HTTP 410: switching git to an API token.
Over SSH: "The requested repository either does not exist or you do not have access"
The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated. fatal: Could not read from remote repository.
Atlassian's knowledge base says Bitbucket Cloud could not tie any key the SSH agent offered to an account that may use this repository (The requested repository either does not exist or you do not have access error in SSH git operations). Check, in this order:
- Is a key accepted at all?
ssh -T git@ssh.bitbucket.org(older instructions saybitbucket.org, which moves to ssh.bitbucket.org). With a key Bitbucket knows, it answers that you are authenticated via ssh key and that shell access is disabled. If not, see "Permission denied (publickey)". - Which key was accepted?
GIT_SSH_COMMAND="ssh -vvv" git fetchlists the keys ssh tries and ends withAuthenticated to ... using "publickey". If that key is on another person's account, or is an access key of a different repository or project, which gives read access to that one only, Bitbucket accepts it and then answers this sentence for your repository. - Is your key loaded? If the key on your account sits outside
~/.sshor under another name, ssh does not offer it.ssh-add -llists what the agent offers, andssh-add <path to the private key>adds it; on Windows with PuTTY, add it in Pageant. - Does the account have access? If the right key is used and the repository is there, ask an administrator of the workspace or the repository to give that account access, or write access to push.
Bitbucket pull requests in IntelliJ IDEA
Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, reads the workspace and repository from your git remote, HTTPS or SSH, and signs in to the REST API with your Atlassian e-mail and an API token, so the git user name does not matter to it. When Bitbucket answers 404, it names the repository it asked for. Public repositories are read without a token. The review inbox, diffs and discussions are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.
More: Bitbucket pull request plugins for IntelliJ IDEA, compared · "Permission denied (publickey)" · Bitbucket Git remote URLs, every form tested · 日本語