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

Most upvoted comments

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. (just error saving generating JWT secret).

Either disable oauth2 or 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_TOKEN using gitea generate secret INTERNAL_TOKEN. You can find my install procedure (using ansible) here