GITEA_MIRROR_INTERVAL gets lost after saving settings #139

Closed
opened 2026-10-05 01:44:11 +02:00 by adam · 3 comments
Owner

I've noticed that the value I set in the environment variable GITEA_MIRROR_INTERVAL is lost any time I save a setting in the UI, reverting to the default value of 8h.

Steps to reproduce:

  1. Set a non-default value in the environment where Gitea Mirror is running, e.g. GITEA_MIRROR_INTERVAL=10m.
  2. Sync a repository from the Repositories page in the UI.
  3. Verify in Gitea that the value is 10m.
  4. Go to the Configuration page and change any value, or simply press a Test Connection button.
  5. Go back to the Repositories page and sync a repository.
  6. Observe in Gitea that the value is now the default of 8h.

From what I can tell, the only workaround is to restart the Docker container and not touch any settings to ensure the correct interval is respected.

I've noticed that the value I set in the environment variable `GITEA_MIRROR_INTERVAL` is lost any time I save a setting in the UI, reverting to the default value of `8h`. Steps to reproduce: 1. Set a non-default value in the environment where Gitea Mirror is running, e.g. `GITEA_MIRROR_INTERVAL=10m`. 2. Sync a repository from the Repositories page in the UI. 3. Verify in Gitea that the value is `10m`. 4. Go to the Configuration page and change any value, or simply press a Test Connection button. 5. Go back to the Repositories page and sync a repository. 6. Observe in Gitea that the value is now the default of `8h`. From what I can tell, the only workaround is to restart the Docker container and not touch any settings to ensure the correct interval is respected. <!-- github-sync-id:4823120799 -->
adam closed this issue 2026-10-05 01:44:11 +02:00
Author
Owner

Fixed in #345. The config page auto-saves whenever any field changes, and the save path was hardcoding the interval back to 8h since the form has no field for it. That's also why Test Connection seemed to trigger it — the button itself doesn't save anything, but typing the token beforehand does. Env-configured settings now survive saves.

Will be in the next release — would be great if you can confirm your 10m interval sticks after upgrading.

Fixed in #345. The config page auto-saves whenever any field changes, and the save path was hardcoding the interval back to 8h since the form has no field for it. That's also why Test Connection seemed to trigger it — the button itself doesn't save anything, but typing the token beforehand does. Env-configured settings now survive saves. Will be in the next release — would be great if you can confirm your 10m interval sticks after upgrading. <!-- github-comment-id:4993718417 -->
Author
Owner

v3.21.0 is out with this fix — give it a try and let me know if your interval sticks now. https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3.21.0

v3.21.0 is out with this fix — give it a try and let me know if your interval sticks now. https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3.21.0 <!-- github-comment-id:4994244512 -->
Author
Owner

Looks good! Thanks for the fix @arunavo4.

Looks good! Thanks for the fix @arunavo4. <!-- github-comment-id:4995675461 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/gitea-mirror#139