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

Push failed with "Unable to find configuration file" #25633

Closed
tuxmaster5000 opened this issue Jul 2, 2023 · 10 comments
Closed

Push failed with "Unable to find configuration file" #25633

tuxmaster5000 opened this issue Jul 2, 2023 · 10 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@tuxmaster5000
Copy link
Contributor

Description

An push to an repo fails with:

remote: Resolving deltas: 100% (56/56), completed with 13 local objects.
remote: 2023/07/02 18:05:11 ...s/setting/setting.go:260:newFileProviderFromConf() [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.

But the config file is /etc/gitea/app.ini and the app is started with it.
On the web ui the correct path is shown.
Enable the debug mode will not showing any error/warning etc, at the push

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.39.3

Operating System

Rocky 9.2

How are you running Gitea?

Binary download. Running via systemd.

Database

PostgreSQL

@tuxmaster5000
Copy link
Contributor Author

Fixed by call:
"Resynchronize pre-receive, update and post-receive hooks of all repositories."
on the ui. It will be nice when an hint about it, will be shown instant only the error.

@wxiaoguang
Copy link
Contributor

How did you trigger the bug? The hooks should already have been synchronized automatically: #21619

@tuxmaster5000
Copy link
Contributor Author

In the systemd unit config, the config file was renamed from gitea.ini to app.ini.
gitea it self was stared correct, and has accepted the new file name. Only the hooks have used the old config file until the refresh was triggered manual.

@lunny
Copy link
Member

lunny commented Jul 27, 2023

/etc/gitea/gitea.ini or /etc/gitea/app.ini? Maybe there is a typo?
I think this has been resolved?

@lunny lunny added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Jul 27, 2023
@tuxmaster5000
Copy link
Contributor Author

@lunny Only with manual intervention.

@GiteaBot
Copy link
Collaborator

GiteaBot commented Sep 8, 2023

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 8, 2023

Could you reproduce the problem? For example, if you rename the app.ini again (and update the systemd service), then you restart the Gitea service, would you see logs like re-sync repository hooks ... ? Does it still need to "Resynchronize" manually?

@wxiaoguang wxiaoguang reopened this Sep 8, 2023
@tuxmaster5000
Copy link
Contributor Author

In the current version(1.20.4) it will works:

Sep 12 17:42:25 gitea[595789]: 2023/09/12 17:42:25 routers/init.go:86:syncAppConfForGit() [I] CustomConf changed from '/etc/gitea/app.ini' to '/etc/gitea/app.ini.test'
Sep 12 17:42:25 gitea[595789]: 2023/09/12 17:42:25 routers/init.go:92:syncAppConfForGit() [I] re-sync repository hooks ..

@wxiaoguang
Copy link
Contributor

Hmm, it works as expectation. Maybe we can close this issue until it could reproduce? TBH I have no idea about how to debug it at the moment .........

@techknowlogick
Copy link
Member

closing per @wxiaoguang comment. please re-open if/when needed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

5 participants