Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Create and set an SSH key Edited

Hello,

This question may seem naive, but I lost more than an hour on that, there is something I don't get I guess.

 

I'm trying to set a new SSH key on my desktop SourceTree AND on my Bitbucket account.

If I use Putty (SourceTree > Tools > Create or import...) to create a new ssh key, it's recognized by Pageant but it's not possible to add it on bitbucket.org (error : "That SSH key is invalid." while putty and pageant sais it's not...)

If I use ssh-keygen -t rsa -b 4096 -C "my_email@example.com" to generate a public and private key, it's recognized on bitbucket.org BUT it can be imported on Pageant so is not used by SourceTree.

My need is quite simple, I had no problem on Mac OS X, but this is a new windows 10 and nothing works like it's supposed to.

Can you see something I'm doing wrong ?

Why does Putty/Pageant does not excpect the same things than Bitbucket/github SSK key validation tool ?

 

Thanks !

 

2 answers

1 accepted

1 vote
Answer accepted

After several tests, I found two things :

1) It works with the ECDSA format (one should generate a key with this format using Putty)

2) when importing your public key on bitbucket.org, DO NOT paste the content of the public key file (what you see by opening it with your favorite text editor), as the example A below. Instead, use Putty to load you key and copy-paste the format B below.

Format A (our public key file, which is not accepted by bitbucket)

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "ecdsa-key-20200130"
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPzjhomgFGLy
6MiY9QHoMUhMmGNLhCvUmfGFXf3lZr0IiDWWSpDznU91U51H1ZfSvse+0E7MjEZz
Mp1dmaSbMj8=
---- END SSH2 PUBLIC KEY ----
 

Format B (visible in Putty when you load the .ppk file)

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPzjhomgFGLy6MiY9QHoMUhMmGNLhCvUmfGFXf3lZr0IiDWWSpDznU91U51H1ZfSvse+0E7MjEZzMp1dmaSbMj8= ecdsa-key-20200130

0 votes

Hi @Ivan_Logre 

It may be because of the file format. Putty will generate a file in .ppk format,

where as the ssh key will have id_rsa (which is a private key) and id_rsa.pub (which is a public key)

Hi, thanks for your answer.

Putty allows you to save the public key and the private key appart too, but you are right the private part is formatted as a .ppk.

My question is : SourceTrre and Bitbucket are supposed to be totally integrated, working great together. Why is sourcetree based on putty & pageant --> pushing .ppk keys which are not valid on bitbucket.org ?

I found a partial answer, I'll post it ;)

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,378 views 4 5
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