Skip to content

Unable to load config file #26496

@Android-X13

Description

@Android-X13

Description

I cannot run gitea through the command line, example:

gitea admin user list

...s/setting/setting.go:103:MustInstalled() [F] Unable to load config file for a installed Gitea instance, you should either use "--config" to set your config file (app.ini), or run "gitea web" command to install Gitea.

gitea --config /etc/gitea/app.ini admin user list

...s/setting/setting.go:96:InitCfgProvider() [F] Unable to init config provider from "/etc/gitea/app.ini": unable to check if "/etc/gitea/app.ini" is a file. Error: stat /etc/gitea/app.ini: permission denied

I cannot run gitea as user git since that user is setup with --disabled-password as per the official instructions.

Setting the USER environment variable (taken from here) also does not work:

USER=git gitea admin user list
USER=git gitea --config /etc/gitea/app.ini admin user list

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.2

Operating System

Raspbian bullseye

How are you running Gitea?

systemd

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions