-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
WorkingDirectory/GITEA_WORK_DIR is ignored, leading to push error #17544
Comments
Could you paste your systemctl service file? |
How are you pushing? HTTP, HTTPS, Internal or external SSH. Have you run the update authorized keys and hooks task? |
I push via SSH and also run the mentioned task, but no fix. |
Here's the service file:
|
Your problem is not at the systemd level but at the authorized_keys level. Either gitea serv or gitea hook are causing the problem. There are several options:
|
I followed 2). I set Now I get (when trying to push a copy of
It seems like generated |
yup unfortunately it looks like the hooks don't get the work-path option. Would it be possible to try one of the other options I presented? |
@zeripath option 3 and 4 isn't applicable here. For option 3, I tested by manually running the FHS script:
It returns error:
When I read the offending line, I see Maybe it's error in the script? |
Damn, Try changing: gitea/contrib/fhs-compliant-script/gitea Line 40 in 3be156f
to: GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" exec -a "$0" "$GITEA" $CONF_ARG "$@" |
Is the problem resolved? and ... should we fix the |
Just done so in #17846 |
Gitea Version
commit d6f4820
Git Version
2.33.0
Operating System
Debian 11
How are you running Gitea?
Built from source with Go 1.17.2, Node 14.17.6 (npm 6.14.15), GNU Make 4.2.1 on Ubuntu 20.04. Gitea instance runs on Debian 11 LXD container (host is Ubuntu 20.04) with systemd service.
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
(not relevant)
Description
Whenever I push to my Gitea instance via
git push
, I got this error:It seems like Gitea ignores
WorkingDirectory
directive (systemd) and/orGITEA_WORK_DIR
environment variable and attempts to createdata
directory on Gitea prefix (/opt/gitea
), which can't be written bygit
user that runs Gitea.I can clone (and possibly pull) from Gitea instance, though.
The log doesn't log anything for this issue, so it isn't relevant.
This issue can't be reproduced on try instance.
Screenshots
No response
The text was updated successfully, but these errors were encountered: