Gitea push failure by pre-receive.d/gitea No such file or directory #14250

Closed
opened 2025-11-02 11:07:32 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @TinyZzh on GitHub (Mar 14, 2025).

Description

Just push failure.
the pre-receive.d/gtiea file snapshot:
Image
the file path and the gitea.exe file is exists.

Gitea Version

1.23.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image

Image

Image

Git Version

git version 2.47.1.windows.2

Operating System

windows 10 22H2

How are you running Gitea?

reinstall a new empty gitea.

Database

SQLite

Originally created by @TinyZzh on GitHub (Mar 14, 2025). ### Description Just push failure. the pre-receive.d/gtiea file snapshot: ![Image](https://github.com/user-attachments/assets/afbb83c3-f16e-4c5d-a166-01d61559f5b7) the file path and the gitea.exe file is exists. ### Gitea Version 1.23.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![Image](https://github.com/user-attachments/assets/cf523c7d-2662-4270-b240-5327e0302f1a) ![Image](https://github.com/user-attachments/assets/976e1def-2b12-468d-9ac9-906df58c9a16) ![Image](https://github.com/user-attachments/assets/3c98beea-c9fa-4d94-a216-92327df78a38) ### Git Version git version 2.47.1.windows.2 ### Operating System windows 10 22H2 ### How are you running Gitea? reinstall a new empty gitea. ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 11:07:32 -06:00
Author
Owner

@TinyZzh commented on GitHub (Mar 14, 2025):

I try to comment out this line of the pre-receive.d/gitea hook.
Image

it push successful.

@TinyZzh commented on GitHub (Mar 14, 2025): I try to comment out this line of the pre-receive.d/gitea hook. ![Image](https://github.com/user-attachments/assets/b9bdb489-5367-4337-a961-ff4d396d5f1a) it push successful.
Author
Owner

@lunny commented on GitHub (Mar 14, 2025):

Maybe it should be F:\\Gitea\gitea.exe

@lunny commented on GitHub (Mar 14, 2025): Maybe it should be `F:\\Gitea\gitea.exe`
Author
Owner

@TinyZzh commented on GitHub (Mar 14, 2025):

It doesn't work. I modified the configuration in app.ini, setting WORK_PATH = F:\Gitea, but the files under hooks are automatically generated by Gitea, and the paths in those files are still being set to 'F:\Gitea\gitea.exe hook --config="F:\Gitea\custom\conf\app.ini" pre-receive'.

Image

@TinyZzh commented on GitHub (Mar 14, 2025): It doesn't work. I modified the configuration in app.ini, setting WORK_PATH = F:\Gitea, but the files under hooks are automatically generated by Gitea, and the paths in those files are still being set to 'F:\Gitea\gitea.exe hook --config="F:\Gitea\custom\conf\app.ini" pre-receive'. ![Image](https://github.com/user-attachments/assets/99e75e14-5357-47df-a8a5-0779b2e37461)
Author
Owner

@TinyZzh commented on GitHub (Mar 14, 2025):

Resolved by SCRIPT_TYPE = sh , modify the script type if you use the windows system.

;[repository]
;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
SCRIPT_TYPE = sh
@TinyZzh commented on GitHub (Mar 14, 2025): Resolved by `SCRIPT_TYPE = sh` , modify the script type if you use the windows system. ```ini ;[repository] ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. SCRIPT_TYPE = sh ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14250