Clone
1
SSH Setup
Ole Valente edited this page 2026-07-07 18:08:07 +02:00

SSH Setup for Git Operations

The Gitea MCP handles all Gitea API operations (repos, issues, PRs, etc.) via HTTPS. However, git operations (clone, push, pull, fetch) go through SSH.

Configure SSH for Gitea

Add to ~/.ssh/config:

Host gt.covalente.dk
    HostName gt.covalente.dk
    Port 222
    User git
    IdentityFile ~/.ssh/your_ssh_key

Replace:

  • gt.covalente.dk with your Gitea instance hostname
  • 222 with your Gitea SSH port (default Gitea SSH is 222, not 22)
  • ~/.ssh/your_ssh_key with the path to your SSH private key

Verify SSH Access

ssh -T git@gt.covalente.dk -p 222

Expected output (Gitea doesn't provide shell access, but confirms authentication):

Hi there, username! You've successfully authenticated with the key named your_key,
but Gitea does not provide shell access.

Using SSH with Goose

Goose can run git commands via its shell tool. Once SSH is configured:

# Clone
git clone git@gt.covalente.dk:owner/repo.git

# Add, commit, push
git add .
git commit -m "message"
git push origin main

SSH + MCP = Full Workflow

Operation Tool Transport
Create repo Gitea MCP (create_repo) HTTPS API
Create issue Gitea MCP (issue_write) HTTPS API
Clone repo Shell (git clone) SSH port 222
Push code Shell (git push) SSH port 222
Create PR Gitea MCP (pull_request_write) HTTPS API
Merge PR Gitea MCP (pull_request_write) HTTPS API