gitea: Gitea cannot start with a read-only config
- Gitea version (or commit ref): 1.7.0-rc2
- Git version: NA
- Operating system: Arch Linux with Docker 18.09
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io: NA
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
2019/01/11 19:34:13 [...s/setting/setting.go:941 NewContext()] [E] Error saving generated JWT Secret to custom config: open /data/gitea/conf/app.ini: permission denied
2019/01/11 19:34:14 [...s/setting/setting.go:941 NewContext()] [E] Error saving generated JWT Secret to custom config: open /data/gitea/conf/app.ini: permission denied
Description
Running with the exact same configuration and on 1.6 latest docker image does not give this error.
The configuration file does have the following lines:
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/gitea/lfs
LFS_JWT_SECRET = ${lfs-jwt-secret}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 44 (23 by maintainers)
Commits related to this issue
- Disable LFS server because 1.7 breaks: https://github.com/go-gitea/gitea/issues/5704 — committed to captn3m0/nebula by captn3m0 5 years ago
- WIP add gitea role: - Install the Gitea self-hosted git service https://gitea.io/ - Install gitea from precompiled binary - enable gitea role in playbook - transmission: remove tasks for stopping/... — committed to nodiscc/xsrv by nodiscc 5 years ago
A recent release enable
oauth2, which means gitea will now try to generate a oauth JWT secret, and fail on the upgrade. Took me a while to figure out, because the error message doesn’t say that the JWT is for oauth. (justerror saving generating JWT secret).Either disable
oauth2or generate a new JWT secret and put it in the oauth2 block for a fix.Gitea is now running properly with a read-only config file for me. Indeed the solution was to generate
INTERNAL_TOKENusinggitea generate secret INTERNAL_TOKEN. You can find my install procedure (using ansible) here