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

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
AUG Leaders

Atlassian Community Events