Skip to content

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

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

Closed
ChameleonRed opened this issue Jul 20, 2022 · 4 comments
Closed

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

ChameleonRed opened this issue Jul 20, 2022 · 4 comments
Labels

Comments

@ChameleonRed
Copy link

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

@ChameleonRed
Copy link
Author

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

@silverwind
Copy link
Member

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

@ChameleonRed
Copy link
Author

Later ... I do workaround.

@silverwind
Copy link
Member

The fix was in #19870 which is only in 1.17, so yes, workaround or upgrade please.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants