Only access to one of my repos

la55e March 19, 2022

I connect to bitBucket with SSH-key, and the puplic key is added under personal settings (not under repo settings) so I would expect that the key should work for all repos. Anyway, I can only clone one of my repositories. I also just created a new fresh repository from WEB login, but same problem when I try to clone that one:

Unauthorized
fatal: Could not read from remote repository.

1 answer

1 accepted

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2022

Hi @la55e

G'Day!

When the SSH public key is added under your personal settings it should follow your personal account permission when cloning repositories as long as you have the permission to access it.

Could you try to clone via the CLI with the following parameter:

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone <url>

The verbose logs should show if it's correctly using your SSH key generated or not. Look for "Will attempt key" keywords in the logs which should show that git is trying the list of SSH keys in your local machine that has access to clone the repositories.

If it's not using the SSH keys correctly you can change this by creating an SSH config file by creating it under ~/.ssh/config

Host bitbucket
 HostName bitbucket.org
 IdentityFile <path to your sshkey>

I hope this helps.

Cheers,
Syahrul 

la55e March 21, 2022

Thanks Syahrul,

I found a solution. In addition to the keys I had under "personal settings" I also had one key for the repository which I could access. When I removed this key, I could also access the other reopsitories. Do not know why, but now it works :-)

BR

Lasse

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events