SSH Keys
SSH keys provide secure authentication to remote Git repositories without entering passwords. Axis includes full SSH key management - no terminal required.
SSH Key Basics
SSH uses key pairs for authentication:
- Private key: Kept secret on your machine (
~/.ssh/id_ed25519) - Public key: Shared with services like GitHub (same path with
.pubextension)
Managing SSH Keys
View Your Keys
Go to Settings > SSH Keys to see all SSH keys in your ~/.ssh directory. Each key shows:
- Key type (Ed25519, RSA, ECDSA)
- Comment/name
- Fingerprint
Generate a New Key
- Go to Settings > SSH Keys
- Click the + button
- Choose algorithm (Ed25519 recommended)
- Enter a filename (e.g.,
github_key) - Optionally add a comment and passphrase
- Click Generate
Import an Existing Key
- Go to Settings > SSH Keys
- Click the Import button
- Browse to select your private key file
- Enter a filename for the imported key
- Click Import
Copy Public Key
- Go to Settings > SSH Keys
- Click the Copy button next to a key
- The public key is copied to your clipboard
Export a Key
- Go to Settings > SSH Keys
- Click the Export button next to a key
- Choose a destination folder
- Select whether to export public key only or both keys
- Click Export
Delete a Key
- Go to Settings > SSH Keys
- Click the Delete button next to a key
- Confirm deletion
WARNING
Deleting a key removes it from your system. You'll lose access to any service configured with this key.
Adding Key to GitHub/GitLab
- Copy your public key (see above)
- Go to GitHub > Settings > SSH and GPG keys
- Click New SSH key
- Paste your public key and save
Per-Remote Key Assignment
Axis can assign specific SSH keys to specific remotes, useful when you have multiple keys for different services.
- Go to Repository > Remotes
- Select a remote
- Choose which SSH key to use for this remote
This avoids the need to configure ~/.ssh/config manually.
Passphrase Handling
When you perform Git operations with a passphrase-protected key:
- Axis prompts for the passphrase
- The passphrase is cached in memory for the session
- Future operations use the cached passphrase
SSH Agent Integration
For persistent passphrase caching, add your key to the SSH agent:
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519Key Types
Ed25519 (Recommended)
- Modern, secure, and fast
- Shorter keys with equivalent security
- Widely supported
RSA
- Older but universally compatible
- Use 4096 bits for security
ECDSA
- Elliptic curve cryptography
- Good balance of security and performance
Converting HTTPS to SSH
If your repository uses HTTPS and you want to switch to SSH:
- Go to Repository > Remotes
- Click the remote to edit
- Change URL from HTTPS to SSH format (e.g.,
git@github.com:username/repo.git) - Click Save
Troubleshooting
Authentication Failed
- Verify the key is added to GitHub/GitLab
- Check the key is loaded:
ssh-add -l - Test the connection:
ssh -T git@github.com - Ensure the remote URL uses SSH format
Wrong Key Used
Use per-remote key assignment in Axis, or configure ~/.ssh/config:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_keySecurity Best Practices
- Always use a passphrase - Protects your key if your machine is compromised
- Use unique keys - Different keys for different services
- Rotate keys periodically - Replace old keys annually
- Never share private keys - Only share
.pubfiles
