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

Can't login via SSH when Github and Bitbucket usernames are the same

nikronys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 25, 2020

I have the same email and username of github and bitbucket accounts. I can easily add my github account and it works smoothly. After I add the bitbucket one and try to clone a remote repo, I get this error:

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

fatal: Could not read from remote repository.

It doesn't throw any authentication errors, so creds are fine. The only thing I can do right now is to see my public remote repositories. In the bitbucket SSH keys settings, I see Never used in the Last used column. Moreover, I've removed .ssh folder and set up everything from scratch - doesn't work. I've also tried to generate Bitbucket SSH key myself - doesn't work.

I also have a default Bitbucket account and it works perfectly fine.

Mac OS 10.15.2
Sourcetree 4.0.1
Embedded Git 2.23.0 (in use)
System Git 2.24.1 (switching doesn't help)

1 answer

0 votes
ssulun
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2020

Try adding the following lines to your ssh configuration file. In my Ubuntu, it is ~/.ssh/config

 

Host bitbucket.org
        HostName bitbucket.org
        PreferredAuthentications publickey
        IdentityFile ~/.ssh/id_rsa

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events