500 on repositories after git version 2.37.1.windows.1 #9245

Closed
opened 2025-11-02 08:33:09 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @ChameleonRed on GitHub (Jul 20, 2022).

Description

git version 2.37.1.windows.1

2022/07/20 17:16:25 ...dules/git/command.go:146:RunWithContext() [D] C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: C:\Program Files\Git\cmd\git.exe -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse
2022/07/20 17:16:25 ...ules/context/repo.go:598:RepoAssignment() [E] RepoAssignment Invalid repo C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: exit status 128 - fatal: detected dubious ownership in repository at 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git'
	To add an exception for this directory, call:
	
		git config --global --add safe.directory 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git'
	
	Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run
	again for more information.
	
2022/07/20 17:16:25 ...s/context/context.go:214:HTML() [D] Template: status/500

After setting GIT_TEST_DEBUG_UNSAFE_DIRECTORIES log is more detailed

2022/07/20 17:17:14 ...dules/git/command.go:146:RunWithContext() [D] C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: C:\Program Files\Git\cmd\git.exe -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse
2022/07/20 17:17:14 ...ules/context/repo.go:598:RepoAssignment() [E] RepoAssignment Invalid repo C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: exit status 128 - warning: 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' is owned by:
		'S-1-5-21-3618141223-1333197053-3853304746-1001'
	but the current user is:
		'S-1-5-18'
	fatal: detected dubious ownership in repository at 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git'
	To add an exception for this directory, call:
	
		git config --global --add safe.directory 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git'
	
2022/07/20 17:17:14 ...s/context/context.go:214:HTML() [D] Template: status/500

Gitea Version

1.16.9

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.37.1.windows.1

Operating System

Window 10

How are you running Gitea?

Windows Service

Database

No response

Originally created by @ChameleonRed on GitHub (Jul 20, 2022). ### Description git version 2.37.1.windows.1 ``` 2022/07/20 17:16:25 ...dules/git/command.go:146:RunWithContext() [D] C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: C:\Program Files\Git\cmd\git.exe -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse 2022/07/20 17:16:25 ...ules/context/repo.go:598:RepoAssignment() [E] RepoAssignment Invalid repo C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: exit status 128 - fatal: detected dubious ownership in repository at 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' To add an exception for this directory, call: git config --global --add safe.directory 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run again for more information. 2022/07/20 17:16:25 ...s/context/context.go:214:HTML() [D] Template: status/500 ``` After setting GIT_TEST_DEBUG_UNSAFE_DIRECTORIES log is more detailed ``` 2022/07/20 17:17:14 ...dules/git/command.go:146:RunWithContext() [D] C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: C:\Program Files\Git\cmd\git.exe -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse 2022/07/20 17:17:14 ...ules/context/repo.go:598:RepoAssignment() [E] RepoAssignment Invalid repo C:\Users\Cezary Wagner\gitea-repositories\cezary.wagner\medptr-v2.git: exit status 128 - warning: 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' is owned by: 'S-1-5-21-3618141223-1333197053-3853304746-1001' but the current user is: 'S-1-5-18' fatal: detected dubious ownership in repository at 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' To add an exception for this directory, call: git config --global --add safe.directory 'C:/Users/Cezary Wagner/gitea-repositories/cezary.wagner/medptr-v2.git' 2022/07/20 17:17:14 ...s/context/context.go:214:HTML() [D] Template: status/500 ``` ### Gitea Version 1.16.9 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.37.1.windows.1 ### Operating System Window 10 ### How are you running Gitea? Windows Service ### Database _No response_
GiteaMirror added the type/bug label 2025-11-02 08:33:09 -06:00
Author
Owner

@ChameleonRed commented on GitHub (Jul 20, 2022):

Changing file owner works but it is not done by gitea service.

@ChameleonRed commented on GitHub (Jul 20, 2022): Changing file owner works but it is not done by gitea service.
Author
Owner

@silverwind commented on GitHub (Jul 20, 2022):

safe.directory issues should be fixed in 1.17 or higher, try to upgrade.

@silverwind commented on GitHub (Jul 20, 2022): `safe.directory` issues should be fixed in 1.17 or higher, try to upgrade.
Author
Owner

@ChameleonRed commented on GitHub (Jul 20, 2022):

Later ... I do workaround.

@ChameleonRed commented on GitHub (Jul 20, 2022): Later ... I do workaround.
Author
Owner

@silverwind commented on GitHub (Jul 21, 2022):

The fix was in https://github.com/go-gitea/gitea/pull/19870 which is only in 1.17, so yes, workaround or upgrade please.

@silverwind commented on GitHub (Jul 21, 2022): The fix was in https://github.com/go-gitea/gitea/pull/19870 which is only in 1.17, so yes, workaround or upgrade please.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9245