It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SourceTree reset SSH key Mac

I use SourceTree + BitBucket combination with SSH setup on my Mac. It used to work fine.

Haven't used this Mac to code for a while. Today I tried to do fetch / push, all failed with this permission denied (public key) issue. I've done some research, tried the solutions in this article https://confluence.atlassian.com/bitbucket/troubleshoot-ssh-issues-271943403.html, but still stuck. Here're my steps:

  • Confirmed my SSH key is still in BitBucket, also double checked the key strings are exact match
  • Tried ssh-add -l: The agent has no identities
  • Tried ssh-add /path/to/file: file permission 0644 is too open, ignored
  • Tried chmod 600 /path/to/file, and then ssh-add /path/to/file: ask for passphrase, which I forgot
  • Opened Keychain Access, found the SSH key for this BitBucket account, show password, got it. Tried ssh-add /path/to/file again with the password: keep saying it's Bad Passphrase...I don't understand why this happens.

So now I'm really stuck. I think it might be easier to just reset the SSH key in SourceTree, but couldn't find any references online regarding how to achieve that. Any suggestions?

1 answer

1 accepted

0 votes
Answer accepted

Figured this out. It turns out I tried to ssh-add the .pub file. The correct file would be the one with the same name but without the .pub extension.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,895 views 0 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you