|
You should check for existing SSH keys on your local computer. If you already have a key pair that you want to use, you can go to step 4.
Open a command prompt, and run:
cd %userprofile%/.ssh |
If you see "No such file or directory", then there aren't any existing keys: go to step 3.
Check to see if you have a key already:
dir id_* |
If there are existing keys, you may want to use them: go to step 4.
If you have existing SSH keys, but you don't want to use them when connecting to Stash, you should back those up.
In a command prompt on your local computer, run:
mkdir key_backup copy id_rsa* key_backup |
Now you can generate a new SSH key.
In a command prompt, run:
ssh-keygen -t rsa -C "your_email@example.com" |
Associating the key with your email address helps you to identify the key later on.
Note that the ssh-keygen command is only available if you have already installed Git (with Git Bash).
You'll see a response similar to this:

.ssh directory doesn't exist, the system creates one for you.Enter, and re-enter, a passphrase when prompted. The whole interaction will look similar to this:

You're done!
In your command prompt, change directory to the .ssh directory, and copy the public key file to your clipboard by running:
cd %userprofile%/.ssh clip < id_rsa.pub |
In Stash, go to your profile: