diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2025-07-27 11:36:28 +0100 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2025-07-27 11:36:28 +0100 |
commit | 8984b8989993b3b3835b0a5366b48db6c0d9a44d (patch) | |
tree | bd381a81bd90f47c44683394e8e71a0f330e5b5a /roles/gitserver/files/git.conf | |
parent | 30399ff63f4b798d835ac1059dcb744cb7beddc8 (diff) | |
download | infra-8984b8989993b3b3835b0a5366b48db6c0d9a44d.tar.gz infra-8984b8989993b3b3835b0a5366b48db6c0d9a44d.tar.bz2 infra-8984b8989993b3b3835b0a5366b48db6c0d9a44d.zip |
Remove support for git push via HTTP
It was not working properly anyway, because of the permissions problem,
but intoroduced unnecessary complexity in configuration files.
All others (non-write) git operation should continue to work via HTTP.
Diffstat (limited to 'roles/gitserver/files/git.conf')
-rw-r--r-- | roles/gitserver/files/git.conf | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/roles/gitserver/files/git.conf b/roles/gitserver/files/git.conf index f4e880d..575d977 100644 --- a/roles/gitserver/files/git.conf +++ b/roles/gitserver/files/git.conf @@ -1,17 +1,6 @@ # Source: https://gist.github.com/kierdwyn/3745400e6a184f621b92 location ~ /.+/(info/refs|git-upload-pack|git-receive-pack) { - # Disable authentication by default. - set $auth off; - - # Require authentication for push. - if ($request ~ git-receive-pack) { - set $auth "Restricted"; - } - - auth_basic $auth; - auth_basic_user_file /etc/nginx/auth/git/.htpasswd; - # Set chunks to unlimited, as the body's can be huge. client_max_body_size 0; @@ -19,8 +8,6 @@ location ~ /.+/(info/refs|git-upload-pack|git-receive-pack) { fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; fastcgi_param GIT_PROJECT_ROOT /srv/git; fastcgi_param PATH_INFO $uri; - # Forward REMOTE_USER as we want to know when we are authenticated. - fastcgi_param REMOTE_USER $remote_user; fastcgi_pass unix:/run/fcgiwrap.sock; } |