SSH Access and Gitea Integration
This document explains how to securely access private repositories hosted on git.hadox.org using SSH, and how to configure local and CI environments for authenticated interactions with our Gitea instance.
1. Generating a Personal SSH Key
On your WSL/Ubuntu terminal (or any Unix-like terminal), generate a new SSH key:
ssh-keygen -t ed25519 -C "your-email@example.com"
Press Enter to accept the default save path (~/.ssh/id_ed25519), and optionally set a passphrase.
Then, add the key to your SSH agent:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
2. Uploading the Public Key to Gitea
- Visit https://git.hadox.org/user/settings/keys
- Click "Add Key"
- Paste the contents of
~/.ssh/id_ed25519.pub(you can copy it withcat ~/.ssh/id_ed25519.pub) - Give it a descriptive title and save
3. Cloning Repositories from Gitea
Use the SSH URL format. For example:
git clone ssh://git@git.hadox.org:2222/hadoxmin/madlabs.git
If you are using a non-standard port (2222), make sure to include it.
4. CI/CD SSH Keys (Drone, VPS, etc.)
When configuring CI runners or server-based deployments, use a dedicated SSH key per environment:
- Generate a keypair (e.g.,
drone-hostinger,hostinger-deploy) - Register the public key on Gitea (as a Deploy Key or in your profile)
- Configure the key in the environment (Drone secrets, Hostinger Git Deploy, etc.)
- Avoid reusing personal keys across environments
5. Troubleshooting
- Permission denied (publickey): Verify the key is added to the agent and to Gitea
- Key not accepted: Double-check permissions on
~/.sshand keys (chmod 700 ~/.ssh,chmod 600 ~/.ssh/id_*) - Wrong port: Gitea uses port 2222, not the default 22