The caddy in docker container can reverse proxy this service in same network, so don't worry the access problem, I can access it's website as usual.
My classical PAT scopes: repo,admin:org,user.
When I started, it prints
gitea-mirror | Checking if recovery is needed...
gitea-mirror | Error finding interrupted jobs: 5185 | async function findInterruptedJobs() {
gitea-mirror | 5186 | try {
gitea-mirror | 5187 | const cutoffTime = new Date;
gitea-mirror | 5188 | cutoffTime.setMinutes(cutoffTime.getMinutes() - 10);
gitea-mirror | 5189 | const staleCutoffTime = new Date;
gitea-mirror | 5190 | const interruptedJobs = await db2.select().from(mirrorJobs).where(and(eq(mirrorJobs.inProgress, true), or(or(isNull(mirrorJobs.lastCheckpoint), lt(mirrorJobs.lastCheckpoint, cutoffTime)), lt(mirrorJobs.startedAt, staleCutoffTime))));
gitea-mirror | ^
gitea-mirror | TypeError: undefined is not an object (evaluating 'db2.select')
gitea-mirror | at findInterruptedJobs (/app/dist/scripts/startup-recovery.js:5190:38)
gitea-mirror | at findInterruptedJobs (/app/dist/scripts/startup-recovery.js:5184:36)
gitea-mirror | at hasJobsNeedingRecovery (/app/dist/scripts/startup-recovery.js:13955:54)
gitea-mirror | at hasJobsNeedingRecovery (/app/dist/scripts/startup-recovery.js:13953:39)
gitea-mirror | at runStartupRecovery (/app/dist/scripts/startup-recovery.js:13985:55)
gitea-mirror | at runStartupRecovery (/app/dist/scripts/startup-recovery.js:13972:35)
gitea-mirror | at /app/dist/scripts/startup-recovery.js:14034:19
gitea-mirror | at loadAndEvaluateModule (1:11)
Then, This is the configuration.
Enable Enable automatic repository syncing and Enable automatic database cleanup.
It imported github data successfully.
If I enable Skip forked repositories, and import github data again. Check the Repositories page, It pops up a message An internal server error occurred, then the backend prints
gitea-mirror | Error in repositories fetch: 15 | logger;
gitea-mirror | 16 | exec(query) {
gitea-mirror | 17 | this.client.exec(query);
gitea-mirror | 18 | }
gitea-mirror | 19 | prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper) {
gitea-mirror | 20 | const stmt = this.client.prepare(query.sql);
gitea-mirror | ^
gitea-mirror | SQLiteError: near "=": syntax error
gitea-mirror | errno: 1,
gitea-mirror | byteOffset: 490,
gitea-mirror |
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror |
gitea-mirror | Error name: SQLiteError
gitea-mirror | Error message: near "=": syntax error
gitea-mirror | Error stack: SQLiteError: near "=": syntax error
gitea-mirror | at prepare (unknown)
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror | at processTicksAndRejections (native:7:39)
However, in Repositories,dashboard page, I can preview some repositories. That's too wired.
Then, in Organizations page, it pops up {"error":"An internal server error occurred","timestamp":"2025-06-28T06:01:09.153Z"}, and the backend prints
gitea-mirror | Error in organizations fetch: 15 | logger;
gitea-mirror | 16 | exec(query) {
gitea-mirror | 17 | this.client.exec(query);
gitea-mirror | 18 | }
gitea-mirror | 19 | prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper) {
gitea-mirror | 20 | const stmt = this.client.prepare(query.sql);
gitea-mirror | ^
gitea-mirror | SQLiteError: near "=": syntax error
gitea-mirror | errno: 1,
gitea-mirror | byteOffset: 151,
gitea-mirror |
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror |
gitea-mirror | Error name: SQLiteError
gitea-mirror | Error message: near "=": syntax error
gitea-mirror | Error stack: SQLiteError: near "=": syntax error
gitea-mirror | at prepare (unknown)
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror | at processTicksAndRejections (native:7:39)
Type of mirrored repositories: all public repo I owned(I don't have private repo), uclipboard organization(no private repo), and 2 private repos from another user and he grained me all permissions on those repos. gitea-mirror can find the last type repos, that's amazing!
I don't know what should I do now, I'm not good at this technology stack.
Thank you for your help!
By the way, is it possible to add a new exclude feature in Filtering & Behavior? It's very useful for the situation that some repos I forked are too large that I can't save them in my gitea but for others I still want to save.
Originally created by @dangjinghao on GitHub (Jun 28, 2025).
My `docker-compose.yml`:
```yml
services:
// ...
gitea-mirror:
image: ghcr.io/arunavo4/gitea-mirror:latest
restart: always
container_name: gitea-mirror
volumes:
- gitea-mirror-data:/app/data
volumes:
gitea-mirror-data:
```
The caddy in docker container can reverse proxy this service in same network, so don't worry the access problem, I can access it's website as usual.
My classical PAT scopes: repo,admin:org,user.
When I started, it prints
```txt
gitea-mirror | Checking if recovery is needed...
gitea-mirror | Error finding interrupted jobs: 5185 | async function findInterruptedJobs() {
gitea-mirror | 5186 | try {
gitea-mirror | 5187 | const cutoffTime = new Date;
gitea-mirror | 5188 | cutoffTime.setMinutes(cutoffTime.getMinutes() - 10);
gitea-mirror | 5189 | const staleCutoffTime = new Date;
gitea-mirror | 5190 | const interruptedJobs = await db2.select().from(mirrorJobs).where(and(eq(mirrorJobs.inProgress, true), or(or(isNull(mirrorJobs.lastCheckpoint), lt(mirrorJobs.lastCheckpoint, cutoffTime)), lt(mirrorJobs.startedAt, staleCutoffTime))));
gitea-mirror | ^
gitea-mirror | TypeError: undefined is not an object (evaluating 'db2.select')
gitea-mirror | at findInterruptedJobs (/app/dist/scripts/startup-recovery.js:5190:38)
gitea-mirror | at findInterruptedJobs (/app/dist/scripts/startup-recovery.js:5184:36)
gitea-mirror | at hasJobsNeedingRecovery (/app/dist/scripts/startup-recovery.js:13955:54)
gitea-mirror | at hasJobsNeedingRecovery (/app/dist/scripts/startup-recovery.js:13953:39)
gitea-mirror | at runStartupRecovery (/app/dist/scripts/startup-recovery.js:13985:55)
gitea-mirror | at runStartupRecovery (/app/dist/scripts/startup-recovery.js:13972:35)
gitea-mirror | at /app/dist/scripts/startup-recovery.js:14034:19
gitea-mirror | at loadAndEvaluateModule (1:11)
```
Then, This is the configuration.
<img width="1130" alt="Image" src="https://github.com/user-attachments/assets/007a56c3-2dac-429c-a2b0-100f81c33d6b" />
Enable `Enable automatic repository syncing` and `Enable automatic database cleanup`.
It imported github data successfully.
If I enable `Skip forked repositories`, and import github data again. Check the `Repositories` page, It pops up a message `An internal server error occurred`, then the backend prints
```txt
gitea-mirror | Error in repositories fetch: 15 | logger;
gitea-mirror | 16 | exec(query) {
gitea-mirror | 17 | this.client.exec(query);
gitea-mirror | 18 | }
gitea-mirror | 19 | prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper) {
gitea-mirror | 20 | const stmt = this.client.prepare(query.sql);
gitea-mirror | ^
gitea-mirror | SQLiteError: near "=": syntax error
gitea-mirror | errno: 1,
gitea-mirror | byteOffset: 490,
gitea-mirror |
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror |
gitea-mirror | Error name: SQLiteError
gitea-mirror | Error message: near "=": syntax error
gitea-mirror | Error stack: SQLiteError: near "=": syntax error
gitea-mirror | at prepare (unknown)
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror | at processTicksAndRejections (native:7:39)
```
However, in Repositories,dashboard page, I can preview some repositories. That's too wired.
Then, in Organizations page, it pops up `{"error":"An internal server error occurred","timestamp":"2025-06-28T06:01:09.153Z"}`, and the backend prints
```txt
gitea-mirror | Error in organizations fetch: 15 | logger;
gitea-mirror | 16 | exec(query) {
gitea-mirror | 17 | this.client.exec(query);
gitea-mirror | 18 | }
gitea-mirror | 19 | prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper) {
gitea-mirror | 20 | const stmt = this.client.prepare(query.sql);
gitea-mirror | ^
gitea-mirror | SQLiteError: near "=": syntax error
gitea-mirror | errno: 1,
gitea-mirror | byteOffset: 151,
gitea-mirror |
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror |
gitea-mirror | Error name: SQLiteError
gitea-mirror | Error message: near "=": syntax error
gitea-mirror | Error stack: SQLiteError: near "=": syntax error
gitea-mirror | at prepare (unknown)
gitea-mirror | at prepare (bun:sqlite:313:37)
gitea-mirror | at prepareQuery (/app/node_modules/drizzle-orm/bun-sqlite/session.js:20:30)
gitea-mirror | at _prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:615:73)
gitea-mirror | at all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:641:17)
gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:649:19)
gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror | at processTicksAndRejections (native:7:39)
```
Type of mirrored repositories: all public repo I owned(I don't have private repo), uclipboard organization(no private repo), and 2 private repos from another user and he grained me all permissions on those repos. `gitea-mirror` can find the last type repos, that's amazing!
I don't know what should I do now, I'm not good at this technology stack.
Thank you for your help!
By the way, is it possible to add a new exclude feature in `Filtering & Behavior`? It's very useful for the situation that some repos I forked are too large that I can't save them in my gitea but for others I still want to save.
Hi @dangjinghao sorry for the late reply this week has been very hectic. I am planning to make this install a lot more painless. Will have a lot of new features also added soon. Please wait for next week
@arunavo4 commented on GitHub (Jul 5, 2025):
Hi @dangjinghao sorry for the late reply this week has been very hectic. I am planning to make this install a lot more painless. Will have a lot of new features also added soon. Please wait for next week
I can't pull ghcr.io/arunavo4/gitea-mirror:2.18.0 or ghcr.io/raylabshq/gitea-mirror:2.18.0. It seems that I can't access this new organization raylabshq directly.
@dangjinghao commented on GitHub (Jul 7, 2025):
I can't pull `ghcr.io/arunavo4/gitea-mirror:2.18.0` or `ghcr.io/raylabshq/gitea-mirror:2.18.0`. It seems that I can't access this new organization `raylabshq` directly.
<img width="1344" height="369" alt="Image" src="https://github.com/user-attachments/assets/1d2e6fd5-25e0-4e5a-b6ac-1befe13f0b2e" />
@arunavo4 commented on GitHub (Jul 7, 2025):
@dangjinghao Sorry my bad I had the pakage `private` by mistake. Please try the latest verison
```sh
docker pull ghcr.io/raylabshq/gitea-mirror:v2.20.0
```
All the previously mentioned bugs appear to have been fixed, great work!
However, I have encountered some new issues:
After switching from Single Organization to Mixed Mode and waiting for the POST /api/config request to return a successful response, refreshing the page still displays the Single Organization mode.
When selecting all metadata options in Repository Metadata and waiting for the request to complete, refreshing the page shows "2 of 5 selected". Additionally, if I select PR, labels or milestone, wait, and then refresh the page, the "Repository Metadata" options become unselected. It seems that only issues and wiki could be remembered.
@dangjinghao commented on GitHub (Jul 7, 2025):
All the previously mentioned bugs appear to have been fixed, great work!
However, I have encountered some new issues:
After switching from `Single Organization` to `Mixed Mode` and waiting for the `POST /api/config` request to return a successful response, refreshing the page still displays the `Single Organization` mode.
When selecting all metadata options in `Repository Metadata` and waiting for the request to complete, refreshing the page shows "2 of 5 selected". Additionally, if I select `PR`, `labels` or `milestone`, wait, and then refresh the page, the "Repository Metadata" options become unselected. It seems that only `issues` and `wiki` could be remembered.
<img width="964" height="818" alt="Image" src="https://github.com/user-attachments/assets/424639a0-976e-4334-a60b-c69d0e30f710" />
<img width="979" height="806" alt="Image" src="https://github.com/user-attachments/assets/2e9c25b1-936d-4821-901c-103f52fdaf07" />
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @dangjinghao on GitHub (Jun 28, 2025).
My
docker-compose.yml:The caddy in docker container can reverse proxy this service in same network, so don't worry the access problem, I can access it's website as usual.
My classical PAT scopes: repo,admin:org,user.
When I started, it prints
Then, This is the configuration.
Enable
Enable automatic repository syncingandEnable automatic database cleanup.It imported github data successfully.
If I enable
Skip forked repositories, and import github data again. Check theRepositoriespage, It pops up a messageAn internal server error occurred, then the backend printsHowever, in Repositories,dashboard page, I can preview some repositories. That's too wired.
Then, in Organizations page, it pops up
{"error":"An internal server error occurred","timestamp":"2025-06-28T06:01:09.153Z"}, and the backend printsType of mirrored repositories: all public repo I owned(I don't have private repo), uclipboard organization(no private repo), and 2 private repos from another user and he grained me all permissions on those repos.
gitea-mirrorcan find the last type repos, that's amazing!I don't know what should I do now, I'm not good at this technology stack.
Thank you for your help!
By the way, is it possible to add a new exclude feature in
Filtering & Behavior? It's very useful for the situation that some repos I forked are too large that I can't save them in my gitea but for others I still want to save.@arunavo4 commented on GitHub (Jul 5, 2025):
Hi @dangjinghao sorry for the late reply this week has been very hectic. I am planning to make this install a lot more painless. Will have a lot of new features also added soon. Please wait for next week
@arunavo4 commented on GitHub (Jul 6, 2025):
@dangjinghao Please try
2.18tag rather than latest@arunavo4 commented on GitHub (Jul 7, 2025):
Let me know if you still have issues with the latest release
@dangjinghao commented on GitHub (Jul 7, 2025):
I can't pull
ghcr.io/arunavo4/gitea-mirror:2.18.0orghcr.io/raylabshq/gitea-mirror:2.18.0. It seems that I can't access this new organizationraylabshqdirectly.@arunavo4 commented on GitHub (Jul 7, 2025):
@dangjinghao Sorry my bad I had the pakage
privateby mistake. Please try the latest verison@dangjinghao commented on GitHub (Jul 7, 2025):
All the previously mentioned bugs appear to have been fixed, great work!
However, I have encountered some new issues:
After switching from
Single OrganizationtoMixed Modeand waiting for thePOST /api/configrequest to return a successful response, refreshing the page still displays theSingle Organizationmode.When selecting all metadata options in
Repository Metadataand waiting for the request to complete, refreshing the page shows "2 of 5 selected". Additionally, if I selectPR,labelsormilestone, wait, and then refresh the page, the "Repository Metadata" options become unselected. It seems that onlyissuesandwikicould be remembered.@arunavo4 commented on GitHub (Jul 7, 2025):
@arunavo4 Thanks for reporting this let me take a look.
@arunavo4 commented on GitHub (Jul 7, 2025):
@dangjinghao Its fixed in the version
v2.20.1. Close the Issue once you have verified that its resolved