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

The requested repository either does not exist or you do not have access.

Rafael de Mesquita Moura April 28, 2022

Hi folks. I don't know if someone had this problem before, but I'm facing some weird situation with workspaces.

I have a Bitbucket Cloud workspace to manage my sources and the company who I work for also has one.

I have different ssh keys registered on my profile (one registered at company account and one registered at private account). 

Both keys are in my ~./ssh directory:

$ ls -la ~/.ssh
keyOne
keyOne.pub
keyTwo
keyTwo.pub

When I try to fetch my repositories I receive the error below:

Fetching origin
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.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin

And I've notice that just when I rename one of my keys to id_rsa and id_rsa.pub, the git commands works fine.

Some links I've visit, trying to solve this situation:

https://stackoverflow.com/questions/25927914/git-error-please-make-sure-you-have-the-correct-access-rights-and-the-reposito

https://careerkarma.com/blog/git-please-make-sure-you-have-the-correct-access-rights/

https://github.com/jakubroztocil/cloudtunes/issues/23

I've followed articles and websites, but nothing resolved this problem. The question is, did someone else face this problem before?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2022

Hi Rafael and welcome to the community!

If you use two SSH key pairs and each of them is added to a different Bitbucket account, you will need to do some extra configuration so that each of your local repositories uses the correct SSH key pair.

The following blog post has step by step instructions on how to achieve that:

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events