Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,381
Community Members
 
Community Events
176
Community Groups

Issue with ssh keys

Hey there! I have an issue and I've tried everything but still have the same issue. The thing is I have two different bitbucket.org accounts, and I defined ssh key for both of them, the issue is the first ssh key I've created (for one of my accounts) is working but the second one I've created (for the other account I have) is not working. I've trying to differentiate them with the config file but I'm not having success with this, could anyone help me to solve this?

 

Thanks :)

1 answer

1 accepted

0 votes
Answer accepted

There is not much info that you give here to go off on. However, you can try and debug why the SSH is failing.

A good resource to start would be Atlassian's own troubleshooting guide:

A quick method to debug:

  • Check with `ssh-add -l` what keys are listed in the current keyring
  • Optionally use `ssh-add ~/.ssh/id_rsa_other_key`
  • Check if Bitbucket is in your `~/.ssh/known_hosts` file 
    • You can check the current print in the troubleshooting guide

Other than that I'd say we need some more information on what is going wrong. What do you get back when running the commands?

Hi Rob, thanks for anwering!

*This is the error I get "The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
fatal: Could not read from remote repository."

*And I have my config file like this 

Host bitbucket.org-berenice_twb
HostName bitbucket.org
User git
IdentifyFile ~/.ssh/twb
IdentitiesOnly yes

Host bitbucket.org-berenicerappachiani
HostName bitbucket.org
User git
IdentifyFile ~/.ssh/professional-bemoon
IdentitiesOnly yes

*Once I added the config file it throws me another error "/home/berenice/.ssh/config: line 4: Bad configuration option: identifyfile
/home/berenice/.ssh/config: line 10: Bad configuration option: identifyfile
/home/berenice/.ssh/config: terminating, 2 bad configuration options
fatal: Could not read from remote repository."

*`ssh-add -l` lists me both ssh keys 

*I'll try adding `~/.ssh/known_hosts`

still not working, thanks anyway Rob

I'VE FOUND A SOLUTION! My problem was Bitbucket wasn't recognizing my shh keys since I have two ssh keys for different Bitbucket accounts, so I found this solution https://support.atlassian.com/bitbucket-cloud/docs/set-up-additional-ssh-keys/ here it explains how to create correctly the additional ssh key (since the first one I've created is the default) to differentiate it from the first one and so Bitbucket will be able to recognize which user corresponds for each key. I hope this helps someone else with the same problem.

Awesome.  I left for vacation that day but good to see that you found the problem and also updated this ticket with the solution to your problem to help others :)

Like Berenice likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events