Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create new ssh key every time I try to push to remote

Deleted user August 31, 2019

Every couple of days, when I want to push updates to Bitbucket via Sourcetree, I get a "Could not read from remote repository." error.

To solve that I deed to delete my ssh key form my computer (Mac Pro) and my Bitbucket account and create a new one. Then I can push to remote until I try again a couple of days later. Then I have to replace the ssh keys again.

This started after I updated the Sourcetree app which is on Version3.2.1 (225) now and seems to be the current version.

2 answers

1 accepted

0 votes
Answer accepted
Rafael Pinto Sperafico
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2019

Hi @[deleted] ,

It could be an issue where the ssh agent used by Sourcetree does not have the SSH key stored. Perhaps, you could attempt on:

  1. Click the Console / Terminal button
  2. In the new CLI console / terminal, type
    ssh-add -K ~/.ssh/<git_key_name>
    # provide the location where the SSH key
  3. Back in the Sourcetree UI, try doing a fetch an verify the log output

Kind regards,
Rafael

Deleted user September 1, 2019

I have been working on my project so I needed to to a push to Bitbucket again. I did what you suggested first and the push worked as expected again. Thanks, @Rafael Pinto Sperafico !

0 votes
Gonchik Tsymzhitov
Community Champion
August 31, 2019

Hm, I would say it's problem source tree, 

Could you check error logs for source tree ?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team ’25 europe, early bird extension, conference discount, barcelona, hybrid event, AI teamwork, early bird pass, digital access, collaboration conference, atlassian events, register now, developer conference

1 week left to save on your Team '25 Europe pass

Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.

Learn more
AUG Leaders

Atlassian Community Events