diff options
Diffstat (limited to 'auth.conf')
| -rw-r--r-- | auth.conf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/auth.conf b/auth.conf new file mode 100644 index 0000000..39c7550 --- /dev/null +++ b/auth.conf @@ -0,0 +1,10 @@ +auth.backend = "htpasswd" +auth.backend.htpasswd.userfile = "/run/git-host/secrets/htpasswd" + +$HTTP["querystring"] =~ "(^|&)service=git-receive-pack(&|$)" { + auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user")) +} + +$HTTP["url"] =~ "^/git/.*/git-receive-pack$" { + auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user")) +} |
