Missed Team ’24? Catch up on announcements here.

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

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

yannisdran February 12, 2013

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.

4 answers

1 accepted

13 votes
Answer accepted
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2013

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.
Alireza_Bayat
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!
September 30, 2018

I have set up both public and private keys but I don't know whats wrong i still unable to clone my project on AWS using ssh. any suggestions?

with sudo I get below error

git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.

 

without sudo, appears that the cloning part is working but I get below warning

warning: unable to access '/home/ubuntu/.config/git/attributes': Permission denied

Like # people like this
Şafak Çıplak
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!
February 8, 2020

thanks it works

Like Syssoft LLC likes this
Shyam Kumar
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!
September 5, 2020

Thanks a lot , It solved . sof you may refer this https://www.youtube.com/watch?v=p4Jhf729jgg

4 votes
Jay Soni
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!
December 9, 2018

In my case i need to provide correct permission on key file , using following command in directory where "mykeyfile" is store sudo chmod 400 mykeyfile

mugovemachaka
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 20, 2019

You are a life saver @Jay Soni, I regenerated ssh key many times thinking that they were not okay but the problem was on permissions. Now I can clone, push and pull. Thanks buddy. 

Like kashirindevelopers likes this
Rawan_Al-Omari
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!
April 16, 2020

what do you mean by the key file, please?

Like sofia_b likes this
2 votes
simonolsen September 13, 2018

As a side note, avoid sudo. It can mess up access to apps and install on your computer.

I'm not sure sudo has any effect on git commands anyway, does it?

0 votes
Timidfriendly
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!
October 22, 2020

Links are dead

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events