8

I'm connecting to a private git repository, one which I've been using fine with SourceTree for years.

I'm trying to work with GitKraken since SourceTree is getting increasingly slow, and GitKraken tells me my key pair is "invalid" and I need to check if they are in RSA format.

The key pair was generated by Putty Gen and works fine for SourceTree and other formats. I even tried reopening them in PuttyGen and exporting in RSA format, no difference.

Any idea why? I suspect it's some kind of formatting issue, but it's hard for me to tell and GitKraken has zero documentation on this error.

Thanks in advance.

39thstreet
  • 81
  • 1
  • 2
  • 2
    putty uses an odd format for key storage. Most ssh clients expect the openssh format. [Here's a question about conversion](http://stackoverflow.com/q/2224066/2404501) –  Apr 21 '17 at 20:04
  • What type of private git repo are you trying to access, Visual studio? Then https://stackoverflow.com/a/40663092/1480961 might help. – Roet Oct 10 '17 at 17:33

1 Answers1

1

I did the following steps and work well.

  1. Go to Gitkraken > File > Preferences > Authentication.
  2. Uncheck "Use local SSH agent".
  3. Click the "Generate" button next to "Generate new Private/Public key" and download those files.
  4. Into Gitkraken load both files (SSH Private Key and SSH Public Key) clicking the "Browse" button and select the gitkraken_rsa and gitkraken_rsa.pub files respectively.
  5. Next to the label gitkraken_rsa.pub click on the clipboard icon in order to copy the content of that file.
  6. Go to bitbucket.org, click into the bottom left user icon, then go to, Bitbucket settings > Security > SSH Keys and delete actually keys, after that, click on Add key button, paste the content of RSA file, add label name of that key and press Add key

And it's that, you can establish secure communication between Gitkraken and bitbubket.org.

NOTE: Looks like that key generated by gitkraken has a specific number of bits different to ssh-keygen command, so if you want to generate a key with a specific number of bits use ssh-keygen -b 4096 for 4096 bits length.

e-israel
  • 623
  • 10
  • 30