Can I eliminate "Warning: Permanently added bitbucket.org etc."

kwanbo February 18, 2018

I have a few repos on Bitbucket. Each time I do a 'git push' to Bitbucket I get the following message:

Warning: Permanently added 'bitbucket.org, <blah blah blah>' (RSA) to the list of known hosts.

Everything seems to be working perfectly so this not a roadblock. However, it is a nuisance. How can I stop this annoying message from appearing every time I do a push?

My platform: Git Shell running on Windows 10

 

1 answer

0 votes
Mark A.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2018

Hey Kwanbo,

Typically when connecting, the SSH client will check to see if it is a known host. If the host is not in your ~/.ssh/known_hosts or %USERPROFILE%\.ssh\known_hosts, then you receive the warning. This is noted from our troubleshooting SSH page. 

I found a similar question being asked where the resolution is to create a config folder within the ssh folder and add the following to allow the Windows SSH client to find your known hosts file:

UserKnownHostsFile %USERPROFILE%\.ssh\known_hosts 

You'll adjust the path to what is on your system. 

Please take a look to see if this helps resolve your issue.

Regards,

Mark 

kwanbo February 22, 2018

Hi Mark,

I created an empty known_hosts file in my .ssh directory, and a I set up a config file as you instructed. On my next push to Bitbucket I got the following notice:

Failed to add the host to the list of known hosts (%USERPROFILE%\\.ssh\\known_hosts).

By the way, %USERPROFILE% is exactly what's needed on my system, so that is not the problem.

Please advise.

Mark A.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

Hi Kwanbo,

What are the permissions on the file "known_hosts"?

I'm not exactly sure what you mean regarding the user profile as that is simply a reference to the path of the user executing the command.

Regards,

Mark

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events