SSH keys
Add an SSH key to push and pull over SSH, to sign commits, or both. Open Settings → SSH Keys.
Add an SSH key
- Choose Add SSH key.
- Enter a Title to recognise the key.
- Choose the Key type:
- Authentication: use the key for Git over SSH.
- Signing: use the key to sign commits and tags. Requires an Ed25519 key.
- Authentication & Signing: both.
- Paste your public key, the contents of your
.pubfile. Supported types aressh-ed25519,ssh-rsa,ecdsa-sha2-nistp256/384/521and theirsk-security-key variants. - For authentication keys, choose under Access what the key may do, using the same permissions as personal access tokens.
- Choose Add key.
A key can be registered to only one account. To change an existing key's type or access, delete it and add it again.
From the terminal, cafe auth ssh setup finds your key, registers it and can
configure Git to sign with it. cafe auth ssh add ~/.ssh/id_ed25519.pub adds a
key directly.
Use your key with Git
Copy the SSH address from the repository's Code → SSH tab, such as
git.cafe:owner/repo, and clone with it:
| 1 | git clone git.cafe:owner/repo |
See Git access. SSH connections only serve Git; there is no shell, port forwarding or SFTP.
Sign commits with your key
Add the key with Signing usage, then configure Git:
| 1 | git config --global gpg.format ssh |
| 2 | git config --global user.signingkey ~/.ssh/id_ed25519.pub |
| 3 | git config --global commit.gpgsign true |
cafe auth ssh setup --configure-git-signing --sign-commits does the same.
Remove an SSH key
Choose the bin icon on the key and confirm with Delete. Its access is revoked at the same time.