post-receive git hook fails because "test -x" returns incorrect exitcode #10342

Closed
opened 2025-11-02 09:04:48 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @chylek on GitHub (Feb 25, 2023).

Description

Gitea's post-receive script (part of its git hook mechanism) is not executing scripts in post-receive.d.
Its test -x command to check for executable files in post-receive.d directory always exits with code 1, even when testing a file that has executable flag set.

Running in Docker, gitea 1.18.5.

May be related to https://github.com/alpinelinux/docker-alpine/issues/156 and #21455.

Gitea Version

1.18.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Alpine in Docker 18.09.6

How are you running Gitea?

Using docker-compose as instructed by https://docs.gitea.io/en-us/install-with-docker

Database

MySQL

Originally created by @chylek on GitHub (Feb 25, 2023). ### Description Gitea's `post-receive` script (part of its git hook mechanism) is not executing scripts in `post-receive.d`. Its `test -x` command to check for executable files in `post-receive.d` directory always exits with code `1`, even when testing a file that has executable flag set. Running in Docker, gitea 1.18.5. May be related to https://github.com/alpinelinux/docker-alpine/issues/156 and #21455. ### Gitea Version 1.18.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Alpine in Docker 18.09.6 ### How are you running Gitea? Using docker-compose as instructed by https://docs.gitea.io/en-us/install-with-docker ### Database MySQL
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 09:04:48 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Feb 25, 2023):

Your docker is too old. Please use docker server >=20.10.6

@wxiaoguang commented on GitHub (Feb 25, 2023): Your docker is too old. Please use docker server >=20.10.6
Author
Owner

@chylek commented on GitHub (Mar 3, 2023):

Thanks, updating Docker solved the issue.

@chylek commented on GitHub (Mar 3, 2023): Thanks, updating Docker solved the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10342