mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 07:15:57 +03:00
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/105
Author: @arunavo4
Created: 9/30/2025
Status: ✅ Merged
Merged: 10/1/2025
Merged by: @arunavo4
Base:
main← Head:fix/forgejo-12-private-repos📝 Commits (2)
34f741bfix: Forgejo 12 compatibility - use separate auth fields for private repos (#102)096e0c0images now tagged lowercase in comments📊 Changes
2 files changed (+129 additions, -63 deletions)
View changed files
📝
.github/workflows/docker-build.yml(+62 -5)📝
src/lib/gitea.ts(+67 -58)📄 Description
Problem
Forgejo 12.0+ rejects migration API calls with credentials embedded in URLs, causing HTTP 422 errors when mirroring private GitHub repositories.
Root Cause
Breaking security change in Forgejo 12.0 (July 2025) enforces credential separation to prevent accidental exposure in logs/errors. Previous versions (Forgejo 11.x, Gitea 1.x) accepted embedded credentials.
Solution
auth_usernameandauth_tokenfields instead of embedding credentials in clone URLsauth_usernameto "oauth2" for GitHub token authenticationauth_tokenfieldChanges
src/lib/gitea.ts:
.github/workflows/docker-build.yml:
Backward Compatibility
✅ Works with Forgejo 12.0+
✅ Works with Forgejo 11.x and earlier
✅ Works with Gitea 1.x
Testing
Public repos: ✅ Working (no auth needed)
Private repos: ✅ Fixed (separate auth fields)
Fixes #102
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.