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

Access Git via SSH

baguss
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!
July 6, 2023

Hello,
after I deleted bitbucket from known_hosts, the following error appears, I tried many tutorials but it didn't work.

 

saya juga sudah mencoba

1) To remove duplicates entries:

 ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts

2) To add new entries:

curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts

3) To test if works:

ssh git@bitbucket.org host_key_info

 

but still can't run

Screenshot 2023-07-06 143550.png
I hope help to solve the problem, thank you

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 6, 2023

Hi @baguss,

Thank you for reaching out to the community.

Based on my understanding, when you run the command below, you're getting the new SSH host keys.

ssh git@bitbucket.org host_key_info

However, when you try to connect to Bitbucket.org via SSH through your 3rd party application, it still can't connect.

If that's correct, I'm suspecting the 3rd party application is interfering with the process of getting the new Bitbucket.org host keys.
Having said that, is there a way for you to manually change your 3rd party application's host key for Bitbucket.org?

Regards,
Mark C

baguss
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!
July 7, 2023

oh it turns out, ssh git@bitbucket.org host_key_info creates/populates known_hosts file, but system only reads git_known_hosts file, so I need to make changes manually, and it works for me,
Thank You

Like Mark C likes this
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 9, 2023

Glad to know it works now @baguss

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events