"Warning: Permanently added the RSA host key for IP address '207.223.240.182' to the list of known hosts."

I was trying to push my first commit on an empty rep to bitbucket. However this:

-git push -u origin --all #to push changes for the first time

resulted to:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

So, I tried to sudo it. The result was this:

Warning: Permanently added the RSA host key for IP address '207.223.240.182' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

So, why did this happen and should I remove the permanently added RSA host key for that uknown ip address? How?

Also, I don't want to set up a SSH yet, as I prefer work with HTTPS as a beginner.

1 answer

1 accepted

This widget could not be displayed.

Hi there, I'm not sure if you're using Windows or Linux, but we have a guide that expains how to get your SSH key setup. We also have a troubleshooting guide. As this error can be the result of a variety of possible issues, I'd recommend going through the guides step-by-step to be sure that your key is

  1. In the correct location
  2. Copied correctly to Bitbucket
  3. In the ssh-agent
    ssh-add -l
  4. That you have your ~/.ssh/config file setup
    Host bitbucket.org
     IdentityFile ~/.ssh/my_key_filename
  5. You can connect via SSH directly
    ssh -Tvv git@bitbucket.org
  6. And that your /path/to/repo/.git/config has the SSH URL in it correctly.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

282 views 15 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you