Creating a PR in 1.13.7 result in an Error 500 [Solved] #9542

Closed
opened 2025-11-02 08:42:27 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @tanrui8765 on GitHub (Sep 9, 2022).

Description


< Problem >

Our gitea is running on Windows Server. There's a repo hosts project developed on Linux. I tried to create a pull request in that repo, but an error 500 occurred. The gitea log shows: 2022/08/15 10:31:25 routers/repo/pull.go:1039:CompareAndPullRequestPost() [E] NewPullRequest: git read-tree master: exit status 128 - error: invalid path 'proj_xxx/bsp/xxx/xxx_Lib/uboot/\'.

A file named \ in that repo, which is valid on Linux, but invalid on Windows Server. This file caused the error.

< Solution >

I deleted this file proj_xxx/bsp/xxx/xxx_Lib/uboot/\ and pull request can be created successfully in that repo.

It is recommended to check filename validation for the repo with Linux based projects, while the gitea is running on Windows.


Gitea Version

1.13.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.23.0.windows.1

Operating System

Win Server 2008

How are you running Gitea?

gitea-1.13.7-windows-4.0-amd64.exe
Run as Windows service

Database

MySQL

Originally created by @tanrui8765 on GitHub (Sep 9, 2022). ### Description --- #### < Problem > Our gitea is running on Windows Server. There's a repo hosts project developed on Linux. I tried to create a pull request in that repo, but an error 500 occurred. The gitea log shows: `2022/08/15 10:31:25 routers/repo/pull.go:1039:CompareAndPullRequestPost() [E] NewPullRequest: git read-tree master: exit status 128 - error: invalid path 'proj_xxx/bsp/xxx/xxx_Lib/uboot/\'`. A file named `\` in that repo, which is valid on Linux, but invalid on Windows Server. This file caused the error. #### < Solution > I deleted this file `proj_xxx/bsp/xxx/xxx_Lib/uboot/\` and pull request can be created successfully in that repo. **It is recommended to check filename validation for the repo with Linux based projects, while the gitea is running on Windows.** --- ### Gitea Version 1.13.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.23.0.windows.1 ### Operating System Win Server 2008 ### How are you running Gitea? gitea-1.13.7-windows-4.0-amd64.exe Run as Windows service ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:42:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9542