Putty Generate Ssh Key Bitbucket

Key Generation

Check for existence

Jan 30, 2020  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. Apr 14, 2014 Hi There, I have been following the documentation on setting up ssh access to bitbucket.organd cannot seem to authenticate to the server. I have created the idrsa from openssl v1.0.1e and have copy-pasted idrsa.pub to the key store through account management, However even after adding the key via.

Jan 26, 2017  allowed SourceTree to generate the keys; deleted the newly generated key files right away (in my case /.ssh/jacobandersen-Bitbucket and /.ssh/jacobandersen-Bitbucket.pub) and made copies of the correct key files (in my case /.ssh/idrsa and /.ssh/idrsa.pub) with the names above. Thus ending up with two identical sets of keys in my /.ssh. PuTTYgen is a key generator tool for creating pairs of public and private SSH keys. It is one of the components of the open-source networking client PuTTY. Although originally written for Microsoft Windows operating system, it is now officially available for multiple operating systems including macOS, Linux.

open Git Bash

Putty Generate Ssh Key Bitbucket

If you have one skip to Add

Generate

Add

Update Settings

you will need the contents of C:Users<USERNAME>.sshid_rsa

  • BitBucket - Set up SSH for Git on Windows > Step 3. Add the public key to your Bitbucket settings. You may need to expand Expand for details.
  • GitHub - Adding a new SSH key to your GitHub account

Git

Already sorted 😊ðŸ‘x8D

Mercurial

Open PuTTY Key Generator (Start > PuttyGen) either Generate or Conversions (my preference)

Conversions > import key > C:Users<USERNAME>.sshid_rsaNote: If you don't see file extensions two file will appear to have the same name. The first (looks like a text file) is the one you want.

  • Save public keyBitbucket.pub.ppk Note .pub. in the file name for the public key.
  • Save private keyBitbucket.ppk

Edit C:Users<USERNAME>mercural.ini and add ssh = ssh -C under [ui]

Tortoise HG

In Tortoise HG check repos start with ssh://hg@Open the repo View > Syncronise (Alt+4)

Pageant Shortcut

If you're fed up with typing in password every time 😕

Create a shortcut in C:Users<USERNAME>AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup

Target

Add Ssh Key Bitbucket

If you create a shortcut in windows Right Click > New > Shortcut you will need to point to the exe ('C:Program Files (x86)PuTTYpageant.exe') and then Right Click > Properties to edit the details.

If you have PuTTY installed.

or if you don't have PuTTY installed but do have TortoiseGit

Start In

SourceTree

Bitbucket Set Up Ssh Key

Couldn’t get this to work, but now it does, so… time for another “note to self”. 🙂

Prerequisites

  • Git, obviously…
  • PuTTY, with puttygen, plink and pageant, to be exact…

Setup

  1. Open puttygen.

  2. Either Load an existing private key, or Generate a new one.

  3. Copy the public key (“Public key for pasting …”) and add it to the git provider settings:

    • https://github.com/settings/keys
    • https://bitbucket.org/account/user/[username]/ssh-keys/
    • https://dev.azure.com/[organization]/_usersSettings/keys
  4. Open pageant.

  5. Load your private key.

  6. Check that the key authentication works with plink:

    plink -v git@github.com
    plink -v git@bitbucket.org
    plink -v git@ssh.dev.azure.com
  7. Set the GIT_SSH environment variable to C:Program FilesPuTTYplink.exe.
    ^^ This is the detail that so many StackOverflow answers and blog/forum posts didn’t mention. Without this, plink worked fine, but git commands still failed with authentication errors.

  8. (optional) Add a shortcut to the private key file to your startup folder. This way pageant will be automatically started, with your key, ready to go, whenever Windows boots up.

Usage

Now, as long as pageant is running with your private key loaded, it should work to clone, pull, push, etc., both to and from, both private and public git repositories. E.g. like this:

git clone git@github.com:example/some-private-repo.git

Note: If you’re asked to accept/store/cache a key, but pressing y doesn’t work, connect using putty first, which should give you a dialog with the same question which does work. Putty will complain/crash because there’s not actually an ssh shell to connect to, but that’s fine. After the key has been saved by putty, git should work fine. E.g. like this:

Sources:makandracards.com, vladmihalcea.com