nginx regex séparé pour git-upload-pack et git-receive-pack

J'ai ceci

location ~ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-upload-pack)${ //send to fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; } 

Cela fonctionne pour le clone. J'ai modifié Gitolite afin que je puisse faire des repos publics sans key ou http user / mot de passe.

Maintenant, quand je souhaite pousser les informations / les references correspondent à cette route et je ne peux pas passer à l'location suivant qui est responsable de la poussée.

 location ~ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-receive-pack)${ //some custom auth and so on } location ~ ^. * user / repo \ .git \ / (HEAD | info / refs | objects / info /.* | git-receive-pack) $ { location ~ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-receive-pack)${ //some custom auth and so on } // quelques authentifications personnalisées et ainsi de suite location ~ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-receive-pack)${ //some custom auth and so on } 

Btw, cela fonctionne dans apache pour appuyer sur les repos publics:

 <LocationMatch "^/username/repo/git-receive-pack$"> </LocationMatch> <LocationMatch "^ / username / repo / git-receive-pack $"> <LocationMatch "^/username/repo/git-receive-pack$"> </LocationMatch> 

La ligne de fond est la suivante:

 ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-upload-pack)$ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-receive-pack)$ ^. * user / repo \ .git \ / (HEAD | info / refs | objects / info /.* | git-upload-pack) $ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-upload-pack)$ ^.*user/repo\.git\/(HEAD|info/refs|objects/info/.*|git-receive-pack)$ 

sont problématiques puisque la première prendra toujours la seconde.

J'ai essayé de faire un peu

 if ($args = "service=git-receive-pack"){ //do redirect to user/repo.git/git-receive-pack but that will not work since //info/refs?service=git-receive-pack must be called first. } if ($ args = "service = git-receive-pack") { if ($args = "service=git-receive-pack"){ //do redirect to user/repo.git/git-receive-pack but that will not work since //info/refs?service=git-receive-pack must be called first. } // redirigez vers l'user / repo.git / git-receive-pack mais cela ne fonctionnera pas depuis if ($args = "service=git-receive-pack"){ //do redirect to user/repo.git/git-receive-pack but that will not work since //info/refs?service=git-receive-pack must be called first. } // info / refs? service = git-receive-pack doit être appelé en premier. if ($args = "service=git-receive-pack"){ //do redirect to user/repo.git/git-receive-pack but that will not work since //info/refs?service=git-receive-pack must be called first. } 

J'ai besoin d'aide avec regex et n'oublie pas que vous ne pouvez pas correspondre à la string de requête de localization dans l'location de Nginx. Par exemple

 user/repo.git/info/refs?service=git-receive-pack user/repo.git/git-receive-pack user / repo.git / info / refs? service = git-receive-pack user/repo.git/info/refs?service=git-receive-pack user/repo.git/git-receive-pack 

peut correspondre à un simple `^. user / repo.git /. (git-receive-pack) $. Cela ne fonctionnera pas car le premier cas de Nginx n'est pas adapté parce que l'location est l'user / repo.git / info / refs.

J'ai résolu cela après 24 heures 🙁

C'est une solution qui fonctionne de moi.

 location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/info/refs { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ args ~ service = git-upload-pack) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } réécrivez ^ /username/repo.git/git-upload-pack; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ args ~ service = git-receive-pack) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } réécrivez ^ /username/repo.git/git-receive-pack; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location ~ /username/repo.git/git-upload-pack { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ request_method ~ POST) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } set $ uri1 $ uri; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ request_method ~ GET) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } set $ uri1 /username/repo.git/info/refs; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param PATH_INFO $ uri1; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param démon REMOTE_USER; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param GIT_PROJECT_ROOT / var / lib / gitolite / référentiels; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param GITOLITE_HTTP_HOME / var / lib / gitolite; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param SCRIPT_FILENAME / usr / bin / gitolite-shell; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_pass 127.0.0.1:1234; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ request_method ~ POST) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } set $ uri1 $ uri; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } if ($ request_method ~ GET) { location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } set $ uri1 /username/repo.git/info/refs; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } auth_basic "Accès restreint pour le path du repository"; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } auth_basic_user_file "/ usr / local / nginx / htpasswd"; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } auth_request / auth; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param PATH_INFO $ uri1; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param GIT_PROJECT_ROOT / var / lib / gitolite / référentiels; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param GITOLITE_HTTP_HOME / var / lib / gitolite; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_param SCRIPT_FILENAME / usr / bin / gitolite-shell; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } fastcgi_pass 127.0.0.1:1234; location = /username/repo.git/info/refs { if ($args ~ service=git-upload-pack) { rewrite ^ /username/repo.git/git-upload-pack; } if ($args ~ service=git-receive-pack){ rewrite ^ /username/repo.git/git-receive-pack; } } location ~ /username/repo.git/git-upload-pack { gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER daemon; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } location = /username/repo.git/git-receive-pack{ gzip off; if ( $request_method ~ POST ){ set $uri1 $uri; } if ( $request_method ~ GET ){ set $uri1 /username/repo.git/info/refs; } satisfy any; auth_basic "Ressortingcted Access for repository_path"; auth_basic_user_file "/usr/local/nginx/htpasswd"; auth_request /auth; fastcgi_param PATH_INFO $uri1; fastcgi_param REMOTE_USER $remote_user; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param GITOLITE_HTTP_HOME /var/lib/gitolite; fastcgi_param SCRIPT_FILENAME /usr/bin/gitolite-shell; fastcgi_param QUERY_STRING $query_ssortingng; fastcgi_pass 127.0.0.1:1234; include fastcgi_params; } 

Ce nginx suce car je n'avais besoin que de 5 lignes de code pour résoudre les press releases sur les repos publics dans Apache. J'espère que ces heures passées en valent la peine.