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 :)
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:
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`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.