You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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 "firstname.lastname@example.org" 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 ?
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 ----
---- END SSH2 PUBLIC KEY ----
Format B (visible in Putty when you load the .ppk file)
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPzjhomgFGLy6MiY9QHoMUhMmGNLhCvUmfGFXf3lZr0IiDWWSpDznU91U51H1ZfSvse+0E7MjEZzMp1dmaSbMj8= ecdsa-key-20200130
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 ;)