Accessing a bitbucket repository from multiple computers doesn't work consistently

Accessing my repo from multiple computers doesn't work consistently. From a new computer I use ssh-keygen to generate a new public/private key pair. I upload the public key to my SSH Keys page of the repo. Then I run ssh-add on the new private key. ssh-add -l confirms that it has been loaded.

This worked one time, but when I tried to do it a second time to access a second repo it doesn't work. I get

conq: repository access denied. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

This worked the first time I tried it. I need to access a second repo, but this doesn't work for the second repo. Botth times I did this from Ubuntu 13.04.

Why does this not work consistently? If this isn't the right way to access a repo from multiple computers what is the correct way?

3 answers

1 accepted

This widget could not be displayed.

It looks like I've run into this issue:

https://bitbucket.org/site/master/issue/1660/ssh-problems-with-multiple-accounts

Also, I should have titled this question "Accessing multiple bitbucket accounts with ssh from the same computer doesn't work consistently"

Apparently I'm going to have to set up an alias in ~/.ssh/config for each account / repo I use, which is a little extra work.

This widget could not be displayed.

Some more info. The two repositories I'm accessing are from two different bitbucket accounts. When I run

ssh -T -v git@bitbucket.org

it shows that it is trying to login as the username for the other bitbucket account.

When I run

git config -l

in the project directories it shows the remote origin URL for the correct bitbucket account for each project.

What changed since I originally cloned the first project was that I cloned a second project from a different bitbucket account / repo and did ssh-add for key for that account / repo.

I really can't figure out what going wrong here.

This widget could not be displayed.

Hi Dean,

 

You need to remove the ssh key from your another account. I too had that problem , after i removed the key from another account things were back to normal. may be there is a way to configure multiple keys

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

157 views 16 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you