This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git-http-backend.cgi: | |
| #!/bin/bash | |
| GIT_PROJECT_ROOT=/home/sshconnectiongit/git | |
| PATH_INFO=$SCRIPT_URL | |
| echo $PATH_INFO >> test.txt | |
| /usr/lib/git-core/git-http-backend | |
| .htaccess: | |
| Options +ExecCgi | |
| AuthName "Private Git Access" | |
| AuthType Basic | |
| #you need to add users and passwords to the .htpasswd file | |
| #you have to add the same user and password on the client machine under ~/.netrc | |
| AuthUserFile /home/sshconnectiongit/git.sshconnection.com/.htpasswd | |
| Require valid-user | |
| RewriteEngine on | |
| #RewriteBase /git | |
| SetHandler cgi-script | |
| #RewriteRule ^([a-zA-Z0-9._]*\.git/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))$ /git/git-http-backend.cgi/$1 | |
| RewriteCond %{REQUEST_URI} ^(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))$ | |
| RewriteRule (.*) git-http-backend.cgi/ [L,E=SCRIPT_URL:/$1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment