My private repository, caniko/ai-skills (repository ID 4917), is experiencing two failures.
1. Repository Switcher Failure
The repository switcher displays the following error:
Could not load repositories: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
While authenticated, accessing:
https://codefloe.com/caniko/ai-skills/repo-switcher/list
redirects to:
https://codefloe.com/caniko/ai-skills
This suggests that the endpoint is returning an HTML redirect response instead of the expected JSON.
2. SSH Git Access Failure
Running:
git ls-remote --heads ssh://git@codefloe.com/caniko/ai-skills.git trunk
produces:
Forgejo: Internal Server Error (no message for end users)
fatal: Could not read from remote repository.
SSH authentication succeeds, and the same SSH key works correctly with caniko/canix.
3. Repository Integrity Checks
The underlying Git data appears healthy:
-
Authenticated API requests for repository metadata, branches, trees, and file contents return HTTP 200.
-
A fresh HTTPS mirror clone completes successfully.
-
git fsck --fullpasses on the mirror clone.
These results suggest that the issue may involve Forgejo’s repository state or access-handling logic rather than Git object corruption.
4. Suspected Root Cause
A stale broken or migrating repository status flag is suspected but not confirmed.
Forgejo’s middleware can redirect repository subpaths when a repository is in one of these states. This could explain the repository switcher’s JSON parsing failure.
The SSH failure may share the same underlying cause, but this remains unverified.
5. Requested Investigation
Could you please:
-
Inspect the repository’s current status flags in Forgejo.
-
Check migration records and background task history for incomplete or failed operations.
-
Examine Forgejo’s SSH server logs for the internal server error.
-
Determine whether the HTTP redirect and SSH failure share a common cause.
-
Restore normal repository functionality using the least invasive corrective action.
Important: Please preserve the existing repository, including its complete Git history, branches, issues, and associated metadata. Do not delete or recreate the repository.