Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming the config file breaks pushes #22049

Closed
thomas-maurice opened this issue Dec 6, 2022 · 3 comments
Closed

Renaming the config file breaks pushes #22049

thomas-maurice opened this issue Dec 6, 2022 · 3 comments

Comments

@thomas-maurice
Copy link

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

@lunny
Copy link
Member

lunny commented Dec 6, 2022

It's by designed.

@lunny lunny removed the type/bug label Dec 6, 2022
@wxiaoguang
Copy link
Contributor

It has been fixed by #21619

@wolfogre
Copy link
Member

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

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants