Repository navigation
Description
What happened
I run Forgejo on the same machine as my T3 Code server (WSL2), over plain HTTP on a nonstandard port (http://forgejo.local:13000), and use an SSH host alias for Git. Following the Forgejo setup and troubleshooting docs left me in a loop: fj was installed and signed in, but T3 Code kept reporting the provider as not authenticated, and the trace told me to install fj/tea. Rescanning, as troubleshooting suggests, never helped.
The setup only worked after changing the project's remote to the http:// web URL and adding an SSH pushurl — steps the docs never mention.
Diagnosis
- Forgejo runs locally at
http://forgejo.local:13000(HTTP only). It is on the same machine as the T3 server and reachable over loopback/LAN, so TLS is unnecessary here. fj0.7.0 is signed in, andfj -H http://forgejo.local:13000 whoamisucceeds.fjstores the login scheme-less asforgejo.local:13000inkeys.json, as it does by design.- The repo remote was
ssh://forgejo/owner/repo.git, withHost forgejoin~/.ssh/config(port 222). T3 matchesfjlogins by web host, and for SSH remotes it assumeshttps://<host>. For a local HTTP-only server that can never authenticate. - With no matching login, T3 falls back to
tea(not installed) and surfaces:Install Forgejo CLI (fj 0.6 or later) or Gitea CLI (tea 0.16 or later) and retry. - The docs' example uses
fj --host https://your-server auth add-token, and troubleshooting says "run the provider's login command on the server, then rescan." Neither covers scheme, port, SSH aliases, or the HTTP-origin requirement, so there is no documented way out. - Related code issues: [Bug]: Forgejo issue tracker fails on SSH host-alias remotes (alias:owner/repo.git) even when fj has a matching alias #38359 (SSH-alias matching and the misleading install hint), [Bug]: Forgejo/Gitea settings show "not authenticated" for HTTP-only (no TLS) hosts #33410 (HTTP-only probing; closed as "could not verify", not supported), Forgejo provider clone selects HTTPS and fails on an SSH-only setup #37428 (clone transport). This issue is specifically the documentation/troubleshooting gap that makes those dead ends unavoidable.
Steps to reproduce
- Run Forgejo on the same machine as the T3 server, over plain HTTP, e.g.
http://forgejo.local:13000. - Sign in:
fj auth add-token -H http://forgejo.local:13000(keys.jsongetsforgejo.local:13000). - Configure the project remote as
ssh://forgejo/owner/repo.gitusing an SSH host alias. - Add the project and open Pull requests or Issues (PR sync triggers the same path).
- T3 reports the provider as not authenticated and the trace says to install
fj/tea, despitefjbeing installed and signed in. Rescanning per troubleshooting changes nothing. - Changing the remote to
http://forgejo.local:13000/owner/repo.gitwithpushurl ssh://forgejo/owner/repo.gitmakes it work.
Version
0.1.11 (server and desktop app)
Environment
T3 Code Desktop on Windows; T3 server on WSL2 Linux (Node 26); self-hosted Forgejo on the same machine over HTTP on port 13000; fj 0.7.0; tea not installed; SSH host alias used for Git.
Evidence
SourceControlProviderError: Source control provider forgejo failed in listChangeRequests:
Install Forgejo CLI (`fj` 0.6 or later) or Gitea CLI (`tea` 0.16 or later) and retry.
The trace shows ForgejoCli.listLogins succeeding while reading the fj keys, then ForgejoCli.execute: tea failing with VcsProcessSpawnError, which produces the install hint. Outside T3, fj -H http://forgejo.local:13000 whoami succeeds.
Related issues
#38359, #33410, #37428. Not duplicates of the code bugs: this issue is the missing documentation and troubleshooting path.
Fix applied or workaround
git remote set-url <remote> http://forgejo.local:13000/owner/repo.git
git remote set-url --push <remote> ssh://forgejo/owner/repo.git
git config --local credential.helper store
# store the Forgejo token as the HTTP password for this hostSuggested docs: a "self-hosted over plain HTTP / local server" subsection covering scheme and port matching, the http:// origin requirement with SSH pushurl, and the token-as-HTTP-password step; plus troubleshooting entries for "fj is signed in but T3 says to install it / not authenticated" and "SSH alias remote".
Filed by
DeepSeek V4.1 Flash (opencode-go) via T3 Code triage (OpenCode agent)
Activity