fix: private GitHub mirror auth for migrate API#255
Conversation
Deploying gitea-mirror-website with
|
| Latest commit: |
df2d9a2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1b590109.gitea-mirror-website.pages.dev |
| Branch Preview URL: | https://codex-fix-issue-254-private.gitea-mirror-website.pages.dev |
🐳 Docker Image Built SuccessfullyYour PR image is available for testing: Image Tag: Pull and Testdocker pull ghcr.io/raylabshq/gitea-mirror:pr-255
docker run -d -p 4321:4321 -e BETTER_AUTH_SECRET=your-secret-here -e BETTER_AUTH_URL=http://localhost:4321 --name gitea-mirror-test ghcr.io/raylabshq/gitea-mirror:pr-255Docker Compose Testingservices:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:pr-255
ports:
- "4321:4321"
environment:
- BETTER_AUTH_SECRET=your-secret-here
- BETTER_AUTH_URL=http://localhost:4321
- BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:4321
📦 View in GitHub Packages |
🔍 Vulnerabilities of
|
| digest | sha256:ed1d7586dde09d893de32484183f900347f1cb9a14091bb617bba77706b7edcd |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 297 MB |
| packages | 800 |
📦 Base Image debian:trixie
| digest | sha256:13f29b6806e531c3ff3b565bb6eed73f2132506c8c9d41bb996065ca20fb27f2 |
| vulnerabilities |
Description
Description
| ||||||||||||||||
Description
| ||||||||||||||||
Description
| ||||||||||||||||
Description
| ||||||||||||||||
Description
|
Overview
Labels (8 changes)
-org.opencontainers.image.created=2026-03-27T08:19:55.388Z
+org.opencontainers.image.created=2026-02-26T07:10:54.054Z
-org.opencontainers.image.description=Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea/Forgejo, with a sleek Web UI and easy Docker deployment.
+org.opencontainers.image.description=Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
-org.opencontainers.image.licenses=AGPL-3.0
+org.opencontainers.image.licenses=NOASSERTION
-org.opencontainers.image.revision=4f3cbc866e37a63c56bf5c7fc349efd0c431932c
+org.opencontainers.image.revision=30e609e08073cf7114bfb278506962a5b19d0677
-org.opencontainers.image.source=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.source=https://github.com/oven-sh/bun
-org.opencontainers.image.title=gitea-mirror
+org.opencontainers.image.title=bun
-org.opencontainers.image.url=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.url=https://github.com/oven-sh/bun
-org.opencontainers.image.version=latest
+org.opencontainers.image.version=1.3.10-debian |
Summary
auth_username: "oauth2"assumption with GitHub-compatible source credentials.Root Cause
A previous Forgejo 12 compatibility refactor removed credentials from clone URLs (correct), but switched private GitHub source auth to
auth_username + auth_tokenwithauth_username="oauth2".That username pattern is not reliably valid for GitHub HTTPS auth and caused private clone failures (
Invalid username or token,could not read Username ... terminal prompts disabled).What Changed
src/lib/gitea.tsmirrorGithubRepoToGitea: usebuildGithubSourceAuthPayload(...)for private sources.mirrorGitHubRepoToGiteaOrg: use the same helper for org mirror path.src/lib/utils/mirror-source-auth.tsauth_username,auth_password, andauth_tokenfrom GitHub config/repo context.src/lib/utils/mirror-source-auth.test.tsTesting
bun test src/lib/utils/mirror-source-auth.test.tsbun test src/lib/gitea.test.tsCloses #254