Gitea: add SSH port 2222, fix Traefik network, update SSH docs

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-13 20:13:57 +02:00
co-authored by Cursor
parent 5014d55d62
commit df98521459
2 changed files with 55 additions and 1 deletions
+46
View File
@@ -0,0 +1,46 @@
# SSH Key Setup for Homelab Git
## 1. Generate key with custom name
```bash
ssh-keygen -t ed25519 -C "miczek.r@gmail.com" -f ~/.ssh/id_ed25519_private -N ""
```
Creates:
- `~/.ssh/id_ed25519_private` (private never share)
- `~/.ssh/id_ed25519_private.pub` (public add to Gitea & GitHub)
## 2. Add to SSH config
Append to `~/.ssh/config`:
```
Host git.zea.lt
HostName 127.0.0.1
Port 2222
IdentityFile ~/.ssh/id_ed25519_private
IdentitiesOnly yes
Host github.com
IdentityFile ~/.ssh/id_ed25519_private
IdentitiesOnly yes
```
## 3. Add public key to remotes
```bash
cat ~/.ssh/id_ed25519_private.pub
```
- **Gitea:** Settings → SSH / GPG Keys → Add Key
- **GitHub:** Settings → SSH and GPG keys → New SSH key
## 4. Trust host keys & push
```bash
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-keyscan git.zea.lt >> ~/.ssh/known_hosts
cd /home/miczek/homelab
git push -u origin main
```