]> git.ekhem.eu.org Git - server.git/commitdiff
[git] Disable the safe directory check.
authorJakub Czajka <jakub@ekhem.eu.org>
Tue, 5 Nov 2024 21:29:25 +0000 (22:29 +0100)
committerJakub Czajka <jakub@ekhem.eu.org>
Tue, 5 Nov 2024 21:37:25 +0000 (22:37 +0100)
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 [new file with mode: 0644]

diff --git a/git/gitconfig b/git/gitconfig
new file mode 100644 (file)
index 0000000..0ac4221
--- /dev/null
@@ -0,0 +1,4 @@
+# Copyright (c) 2024 Jakub Czajka <jakub@ekhem.eu.org>
+
+[safe]
+       directory = *