feat: SSH connectivity check + host:port in FORGEJO_SSH_HOST #6
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!6
Loading…
Reference in a new issue
No description provided.
Delete branch "devel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Validate light spot: bin/validate.sh said the install was healthy
but the first tick failed on git clone because Forgejo's SSH was on
a non-default port. HTTPS-to-the-API working doesn't imply SSH-for-
clone works -- different port, different auth (key vs token).
Surface that gap.
Two changes:
validate.sh tests SSH explicitly. Parses FORGEJO_SSH_HOST for
host[:port], runs
ssh -T -o BatchMode=yes -o ConnectTimeout=10against the endpoint, classifies the result:
FORGEJO_SSH_HOST=host:port or use ~/.ssh/config"
bot's .pub to Forgejo SSH keys"
FORGEJO_SSH_HOST accepts host:port directly. Previously the
variable held just the hostname (with port 22 implied), so any
non-default port required ~/.ssh/config gymnastics. Now the
harness builds an ssh://git@host:port/path URL when a port is
present and the shorthand git@host:path URL otherwise. Operator
sets FORGEJO_SSH_HOST=git.example.com:22381 in .env and the
clone Just Works -- no SSH config required.
The clone-URL construction got extracted to a small ssh_clone_url
helper to keep the two callsites (ensure_repo_local + main flow's
clone-if-needed) in sync.
.env.example updated with both forms documented.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Validate light spot: bin/validate.sh said the install was healthy but the first tick failed on git clone because Forgejo's SSH was on a non-default port. HTTPS-to-the-API working doesn't imply SSH-for- clone works -- different port, different auth (key vs token). Surface that gap. Two changes: 1. validate.sh tests SSH explicitly. Parses FORGEJO_SSH_HOST for host[:port], runs `ssh -T -o BatchMode=yes -o ConnectTimeout=10` against the endpoint, classifies the result: - timeout / refused / DNS error -> "endpoint unreachable, set FORGEJO_SSH_HOST=host:port or use ~/.ssh/config" - permission denied (publickey) -> "key not recognized, add the bot's .pub to Forgejo SSH keys" - welcome / authenticated -> pass 2. FORGEJO_SSH_HOST accepts host:port directly. Previously the variable held just the hostname (with port 22 implied), so any non-default port required ~/.ssh/config gymnastics. Now the harness builds an ssh://git@host:port/path URL when a port is present and the shorthand git@host:path URL otherwise. Operator sets FORGEJO_SSH_HOST=git.example.com:22381 in .env and the clone Just Works -- no SSH config required. The clone-URL construction got extracted to a small ssh_clone_url helper to keep the two callsites (ensure_repo_local + main flow's clone-if-needed) in sync. .env.example updated with both forms documented. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>