summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-05-03 21:20:07 +0100
committerDmitry Ilvokhin <d@ilvokhin.com>2024-05-03 21:20:07 +0100
commitbe92c6854fcaf1f6e837a57598bb12cd9537b0a2 (patch)
treeb07c66a7acf97dfe9a67383973d49f39ffe5d3d0
parentfd2096ce03883f3b3fa379c2c59d46d30f874050 (diff)
downloadinfra-be92c6854fcaf1f6e837a57598bb12cd9537b0a2.tar.gz
infra-be92c6854fcaf1f6e837a57598bb12cd9537b0a2.tar.bz2
infra-be92c6854fcaf1f6e837a57598bb12cd9537b0a2.zip
Open git.ilvokhin.com to the world
-rw-r--r--roles/gitserver/files/git.conf3
-rw-r--r--roles/gitserver/files/git.ilvokhin.com3
2 files changed, 3 insertions, 3 deletions
diff --git a/roles/gitserver/files/git.conf b/roles/gitserver/files/git.conf
index 1434cda..3d6d6a3 100644
--- a/roles/gitserver/files/git.conf
+++ b/roles/gitserver/files/git.conf
@@ -1,6 +1,9 @@
# Source: https://gist.github.com/kierdwyn/3745400e6a184f621b92
location ~ /.+/(info/refs|git-upload-pack|git-receive-pack) {
+ auth_basic "Restricted";
+ 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;
diff --git a/roles/gitserver/files/git.ilvokhin.com b/roles/gitserver/files/git.ilvokhin.com
index d94585f..5e30e36 100644
--- a/roles/gitserver/files/git.ilvokhin.com
+++ b/roles/gitserver/files/git.ilvokhin.com
@@ -1,9 +1,6 @@
server {
server_name git.ilvokhin.com;
- auth_basic "Restricted";
- auth_basic_user_file /etc/nginx/auth/git/.htpasswd;
-
# Asterisk (*) is here to match both git.conf and cgit.conf (if the latter
# exists), because cgit comes with a separate role, but they share one
# server (git.ilvokhin.com) for usage convenience.