How to add your public SSH key to AllSpice
  • 1 Minute to read
  • Dark
    Light
  • PDF

How to add your public SSH key to AllSpice

  • Dark
    Light
  • PDF

Article summary

How to add your public SSH key to AllSpice

Log into your hub.allspice.io account and navigate to https://hub.allspice.io/<user>/settings/keys and click Manage SSH Keys → Add Key.

Key settings are opened and SSH/GPG Keys tab is selected. To the left it says manage SSH keys and on that same line, to the right, there is an add key button outlined in red. Underneath it says manage GPG keys with an add key button to the right.

Copy the contents of the public key file either by opening the file and copying the contents, or by running the following command in git-bash:

cat ~/.ssh/id_ed25519.pub | clip

Name your key, then paste the public key value into the Content field, and click Add Key.

A prompt to enter your key's name with a box labeled content underneath. At the bottom there is an add key button in green outlined in red.

You should see your key, along with the SHA256 fingerprint, which should match the fingerprint from the key generator.

Click Verify to start the process to verify the key.

The key and its SHA256 fingerprint are shown. To the right there is a remove button in red, and beside it is a verify button in blue.

The verification dialog will generate a token and a command for you to run in the terminal.

Verification dialog generated token is shown in the token prompt, with a red remove button in the top right, along with a veriy button and cancel button at the bottom.

Copy the command that the website generates and run it in a terminal like git-bash

Change /path_to_your_pubkey to the location of your public key, most likely %HOMEPATH%/.ssh/id_ed25519.pub

Your token will be different and generated live by the website.

echo -n "94ca2b130aaaa9fe1ca34e2327c5b048c4c1a4608201cc860581b4c62bc670a5" | ssh-keygen -Y sign -n gitea -f /path_to_your_pubkey

Here is an example with the default path:

echo -n "94ca2b130aaaa9fe1ca34e2327c5b048c4c1a4608201cc860581b4c62bc670a5" | ssh-keygen -Y sign -n gitea -f ~/.ssh/id_ed25519.pub

You will be prompted to enter your passphrase:

Git for Windows passphrase prompt.

The program will return an SSH signature. Copy the sig.

-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgdn8sdB2U3ZhiC6ZA2BqpHfv1Nv
ER/Cw278sq7HdMproAAAAFZ2l0ZWEAAAAAAAAABnNoYTUxMgAAAFMAAAALc3NoLWVkMjU1
MTkAAABA2wyLAZb+Uwge7RNisK0uw9B6Oa9IqUMLUjcRxThV3SI9VlrEroDzuTWyXsYz1R
lQmmnOsFkmCs6biOkoVRteAg==
-----END SSH SIGNATURE-----


Paste the signature into the “Armored SSH signature” field and click Verify.

Signature provided above is pasted into the armored SSH signature prompt. There is a verify button in green and a cancel button in red at the bottom.

Here is an example of a successful key verification:

example of a successful key verification. There is a red remove button on the right.

If the process doesn’t work, remove the key from hub.allspice.io and your local machine and start over and generate a new key, paying special attention to all the details.

Set up SSH in TortoiseGit

Right click in a file explorer and select TortoiseGit→Settings.

TortoiseGit settings is selected and outlined in red.

Select Network.

Enter the location of your SSH client in the “SSH Client:” field and then click OK.

common locations are:

c:\Program Files\Git\usr\bin\ssh.exe

C:\Windows\System32\OpenSSH\ssh.exe

Under settings, the network settings are opened. The location of the SSH client is entered in the SSH client text prompt. There is an ok, cancel, apply, and help button at the bottom. Ok is outlined in red.

Test SSH key

Copy a SSH repo link, either from our example, or from your own repository.

Example URL: git@hub.allspice.io:johnny-5/HelloWorld.git

Example repo is opened in the file tab with the repo link pasted in the SSH/HTTPS prompt on the right. Copy URL button is hovered over and outlined in red.

Right click in a file explorer window and select Git Clone.

Git clone is selected after right-clicking in a file explorer.

Enter the SSH link into the URL field and verify that the Directory is the correct location then click OK.

Git clone - TortoiseGit is opened. Under clone existing repository, the SSH link is entered into the URL, which is also outlined in red. At the bottom the ok button is outlined in red.

You may be prompted to enter your passphrase.

Enter passphrase prompt.

This is an example of a successful clone:

successful clone example.

Congratulations

You are now set up to use TortoiseGit with SSH! You should be able to commit changes and push them to Allspice Hub.


Was this article helpful?