The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

SourceTree reset SSH key Mac

wei2go
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 6, 2018

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
wei2go
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 9, 2018

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.

TAGS
AUG Leaders

Atlassian Community Events