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

Thomas Kemperman February 9, 2023

When I perform a git clone git@github.com:{project}.git, I get the message: The requested repository either does not exist or you do not have access.

ssh -Tv git@bitbucket.org says:

debug1: identity file ~/.ssh/id_rsa type 0
debug1: identity file ~/.ssh/id_rsa-cert type -1
debug1: identity file ~/.ssh/id_ed25519_bitbucket type 3



authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

The right key to use is id_ed25519_bitbucket
I added the key to ~/.ssh/config:

Host bitbucket.org
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed25519_bitbucket

I added id_ed25519_bitbucket.pub to my BB profile.

I added id_ed25519_bitbucket to the ssh client with: eval ssh-agent ssh-add ~/.ssh/id_ed25519_bitbucket

I have access to said repository and proof of that is that I'm able to download the code manually via the download option in the web interface.

What can be the culprit that prevents me from cloning the repository onto my machine?

1 answer

1 accepted

0 votes
Answer accepted
Thomas Kemperman February 9, 2023

I found the problem. I forgot to place the custom config before the catch all. 🤦‍♂️

Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519_bitbucket

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events