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