Renaming the config file breaks pushes #9937

Closed
opened 2025-11-02 08:53:32 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @thomas-maurice on GitHub (Dec 6, 2022).

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

Originally created by @thomas-maurice on GitHub (Dec 6, 2022). ### 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
Author
Owner

@lunny commented on GitHub (Dec 6, 2022):

It's by designed.

@lunny commented on GitHub (Dec 6, 2022): It's by designed.
Author
Owner

@wxiaoguang commented on GitHub (Dec 6, 2022):

It has been fixed by https://github.com/go-gitea/gitea/pull/21619

@wxiaoguang commented on GitHub (Dec 6, 2022): It has been fixed by https://github.com/go-gitea/gitea/pull/21619
Author
Owner

@wolfogre commented on GitHub (Dec 30, 2022):

Please upgrade to v1.17.4 or v1.18.0, that will fix it.

@wolfogre commented on GitHub (Dec 30, 2022): Please upgrade to v1.17.4 or v1.18.0, that will fix it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9937