Skip to content

Renaming the config file breaks pushes #22049

Closed
@thomas-maurice

Description

@thomas-maurice

Description

I renamed my config file from /etc/gitea/gitea.ini to /etc/gitea/app.ini and when I tried to push to a pre-existing repo I get the following error:

$ git pushdev
Enter passphrase for key '/home/thomas/.ssh/id_ed25519': 
Enumerating objects: 15, done.   
Counting objects: 100% (15/15), done.  
Delta compression using up to 16 threads                                                             
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 1.59 KiB | 1.59 MiB/s, done.
Total 8 (delta 6), reused 0 (delta 0), pack-reused 0
remote: 2022/12/06 13:17:09 ...s/setting/setting.go:618:loadFromConf() [F] Unable to find configuration file: "/etc/gitea/gitea.ini".
remote:         Ensure you are running in the correct environment or set the correct configuration file with -c.
To 'ssh://git.HOST.TLD:PORT/USER/REPO.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git.HOST.TLD:PORT/USER/REPO.git'

I am running gitea 1.17.3 on linux amd64

Going into the gitea homedir (in my case /var/lib/gitea) and issuing a

$ ln -s app.ini gitea.ini

worked to fix the issue.

This is strange that a repo depends on the filename of the config used to create it, hence reporting it :)

Cheers, and also thanks for all the hard work

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

From the binary from GH release

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions