diff --git a/README.md b/README.md index e82f634..d128f45 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,14 @@ CLEANUP_DRY_RUN=false # Set to true to test without changes If using a reverse proxy (e.g., nginx proxy manager) and experiencing issues with JavaScript files not loading properly, try enabling HTTP/2 support in your proxy configuration. While not required by the application, some proxy configurations may have better compatibility with HTTP/2 enabled. See [issue #43](https://github.com/RayLabsHQ/gitea-mirror/issues/43) for reference. +### Mirror Token Rotation (GitHub Token Changed) + +For existing pull-mirror repositories, changing the GitHub token in Gitea Mirror does not always update stored mirror credentials in Gitea/Forgejo for already-created repositories. + +If sync logs show authentication failures (for example `terminal prompts disabled`), do one of the following: + +1. In Gitea/Forgejo, open repository **Settings → Mirror Settings** and update the mirror authorization password/token. +2. Or delete and re-mirror the repository from Gitea Mirror so it is recreated with current credentials. ## Development ```bash diff --git a/src/lib/gitea-enhanced.ts b/src/lib/gitea-enhanced.ts index 432252b..99161aa 100644 --- a/src/lib/gitea-enhanced.ts +++ b/src/lib/gitea-enhanced.ts @@ -587,12 +587,12 @@ export async function syncGiteaRepoEnhanced({ userId: config.userId, repositoryId: repository.id, repositoryName: repository.name, - message: `Successfully synced repository: ${repository.name}`, - details: `Repository ${repository.name} was synced with Gitea.`, + message: `Sync requested for repository: ${repository.name}`, + details: `Mirror sync was requested for ${repository.name}. Gitea/Forgejo performs the actual pull asynchronously; check remote logs for pull errors.`, status: "synced", }); - console.log(`[Sync] Repository ${repository.name} synced successfully`); + console.log(`[Sync] Mirror sync requested for repository ${repository.name}`); return response.data; } catch (syncError) { if (syncError instanceof HttpError && syncError.status === 400) {