From 536a275f4a9c3a9d85fc68f03c53cda7a8f36c7e Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Tue, 5 Nov 2024 22:29:25 +0100 Subject: [PATCH] [git] Disable the safe directory check. When working with a remote repository, git checks whether user handling the request is also the owner of the git repository. This is a problem when serving the repositories through ssh and http. The former handles requests as user git while the latter as the user of the webserver (e.g. www-data for nginx). Setting git as the owner of a repository break serving through http, and vice versa. This commit disables the check [1]. [1] https://stackoverflow.com/a/71904131 --- git/gitconfig | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 git/gitconfig diff --git a/git/gitconfig b/git/gitconfig new file mode 100644 index 0000000..0ac4221 --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Jakub Czajka + +[safe] + directory = * -- 2.39.5