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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.