Cannot add SSH key via Sourcetree

Following directions for Set up SSH with Sourcetree on Windows at

consistently ends with the following error at the bitbucket site:

Key is not long enough. Bitbucket requires RSA keys be at least 2048 bits.



2 answers

In Putty Key Generator window change the value in the last option (number of bits in generated key) to 2048.



0 votes
Jim Redmond Atlassian Team Sep 20, 2017

You'll need to either make a longer RSA key or use a different type of key.

If you want to make a longer RSA key, there should be an option at the bottom of the PuTTY key generator where you can specify a length. As the message indicates, you'll need to make one that's at least 2048 bits long.

If you want to use a different type, newer versions of PuTTY also support ECDSA or Ed25519 - there should be an option for those at the bottom of the window, if your version of PuTTY support them. (Those types of key do not need to be 2048 bits long; ECDSA keys can be 256, 384, or 521 bits, and Ed25519 keys are all 256 bits.)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

296 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you