{"thread":{"id":"51659","subject":"Upgrade to gitweb-1.8.3.1-20 on centos7 breaks git access","startedAt":"2019-08-17T20:03:51Z","lastAt":"2019-08-17T20:39:39Z","messageCount":2,"participants":["Gaiseric Vandal"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"380611","messageId":"CAGJ3EkWrHPAD04cEcp9P6Hg4jtNFpiGSCSue+5T7oUL+sbhcUQ@mail.gmail.com","threadId":"51659","inReplyTo":null,"subject":"Upgrade to gitweb-1.8.3.1-20 on centos7 breaks git access","fromName":"Gaiseric Vandal","fromEmail":"gaiseric.vandal@gmail.com","sentAt":"2019-08-17T20:03:36Z","receivedAt":"2019-08-17T20:03:51Z","isPatch":false,"sender":{"key":"gaiseric.vandal@gmail.com","avatar":null},"body":"I recently applied the latest patches on centos7, including\ngitweb-1.8.3.1-20.      When I try to access git repos (either via web\nbrowser or git command line.) Repos are configured to require LDAP\nauthentication.\n\n\nI should be able to access repo ABC via\n\nhttps://myserver.domain.com/git/ABC\n\nI get the correct user login prompt but then , after logging, get\nfollowing error\n\n     The requested URL /git/ABC/ was not found on this server.\n\nI don't think any of the config files got changed.\n\nMy partial config is\n\n     # cat /etc/httpd/conf.d/git.conf\n     Alias /git /var/www/git\n\n     <Directory /var/www/git>\n      Options +ExecCGI\n      AddHandler cgi-script .cgi\n      DirectoryIndex gitweb.cgi\n     </Directory>\n     #\n\n\n\n     # cat /etc/httpd/conf.d/gitrepos.conf\n     SetEnv GIT_PROJECT_ROOT /export/gitrepos\n     SetEnv GIT_HTTP_EXPORT_ALL\n     ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n\n     RewriteEngine on\n     RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]\n     RewriteCond %{REQUEST_URI} /git-receive-pack$\n     RewriteRule ^/git/ - [E=AUTHREQUIRED]\n\n     <Files \"git-http-backend\">\n     AuthType Basic\n     AuthBasicProvider ldap\n     AuthLDAPURL \"ldaps://xxxxxxxxxxxxxxx)\"\n     AuthLDAPBindDN  \"uid=xxxxxxxxxxxx\"\n     AuthLDAPBindPassword xxxxxxxxxxxxxxx\n     AuthName \"Git Access\"\n     Require user xxxxx xxxxx xxxxx\n     Order deny,allow\n     Deny from env=AUTHREQUIRED\n     Satisfy any\n     </Files>\n\n\n     <Location /git/ABC>\n     AuthType Basic\n     AuthBasicProvider ldap\n     AuthLDAPURL \"ldaps://xxxxxxxxxxxxxxx)\"\n     AuthLDAPBindDN  \"uid=xxxxxxxxxxxx\"\n     AuthLDAPBindPassword xxxxxxxxxxxxxxx\n     AuthName \"Git Access ABC\"\n     Require user xxxxx xxxxx xxxxx\n     Order deny,allow\n</Location>\n\n\n\nThe /var/www/git/gitweb.cgi file has the default settings.\n\n...\nour $GIT = \"/usr/bin/git\";\n\n# absolute fs-path which will be prepended to the project path\nour $projectroot = \"/var/lib/git\";\n#our $projectroot = \"/export/gitrepos\";\n\n...\n\n\nIf I set $projectroot to point to /export/gitrepos, I can see a list\nof projects when I browse to https://myserver.domain.com/git-\nhowever I wanted to minimize how much information was exposed with no\nauthentication.      And it didn't fix the access problem.\nThe \"git\" command is in the default OS path.   changing\n      our $GIT = \"/usr/bin/git\";\nto\n     our $GIT = \"git\";\n\ndid not help.\n\n\nThe only thing in the httpd error logs that looks relevant is\n\n[Sat Aug 17 15:39:39.826265 2019] [core:info] [pid 15870] [client\nxxxxx] AH00128: File does not exist: /var/www/git/ABC/\n[Sat Aug 17 15:39:44.831598 2019] [ssl:info] [pid 15870] (70007)The\ntimeout specified has expired: [client xxxxx] AH01991: SSL input\nfilter read failed.\n\n\nselinux is disabled.\n\nSince I am getting an authentication prompt with \"Git Access ABC\" in\nthe dialog box it seems clear that the project root is being picked up\nfrom  /etc/httpd/conf.d/gitrepos.conf and that the\n/usr/libexec/git-core/git-http-backend script is being run.\n\n\nAppreciate any advice.\n\nThanks\n"},{"id":"380613","messageId":"c226d34b-e293-1cce-16b0-e35059adaf80@gmail.com","threadId":"51659","inReplyTo":"CAGJ3EkWrHPAD04cEcp9P6Hg4jtNFpiGSCSue+5T7oUL+sbhcUQ@mail.gmail.com","subject":"Re: Upgrade to gitweb-1.8.3.1-20 on centos7 breaks git access","fromName":"Gaiseric Vandal","fromEmail":"gaiseric.vandal@gmail.com","sentAt":"2019-08-17T20:39:36Z","receivedAt":"2019-08-17T20:39:39Z","isPatch":false,"sender":{"key":"gaiseric.vandal@gmail.com","avatar":null},"body":"If I remove /etc/httpd/conf.d/git.conf then I just get  blank page in \nthe browser.\n\nthe ssl_error log shows\n\n[Sat Aug 17 16:17:08.926093 2019] [cgi:error] [pid 18299] [client \nx.x.x.x:25050] AH01215: Request not supported: '/export/gitrepos/ABC/'\n\n\nOn 8/17/2019 4:03 PM, Gaiseric Vandal wrote:\n> I recently applied the latest patches on centos7, including\n> gitweb-1.8.3.1-20.      When I try to access git repos (either via web\n> browser or git command line.) Repos are configured to require LDAP\n> authentication.\n>\n>\n> I should be able to access repo ABC via\n>\n> https://myserver.domain.com/git/ABC\n>\n> I get the correct user login prompt but then , after logging, get\n> following error\n>\n>       The requested URL /git/ABC/ was not found on this server.\n>\n> I don't think any of the config files got changed.\n>\n> My partial config is\n>\n>       # cat /etc/httpd/conf.d/git.conf\n>       Alias /git /var/www/git\n>\n>       <Directory /var/www/git>\n>        Options +ExecCGI\n>        AddHandler cgi-script .cgi\n>        DirectoryIndex gitweb.cgi\n>       </Directory>\n>       #\n>\n>\n>\n>       # cat /etc/httpd/conf.d/gitrepos.conf\n>       SetEnv GIT_PROJECT_ROOT /export/gitrepos\n>       SetEnv GIT_HTTP_EXPORT_ALL\n>       ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n>\n>       RewriteEngine on\n>       RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]\n>       RewriteCond %{REQUEST_URI} /git-receive-pack$\n>       RewriteRule ^/git/ - [E=AUTHREQUIRED]\n>\n>       <Files \"git-http-backend\">\n>       AuthType Basic\n>       AuthBasicProvider ldap\n>       AuthLDAPURL \"ldaps://xxxxxxxxxxxxxxx)\"\n>       AuthLDAPBindDN  \"uid=xxxxxxxxxxxx\"\n>       AuthLDAPBindPassword xxxxxxxxxxxxxxx\n>       AuthName \"Git Access\"\n>       Require user xxxxx xxxxx xxxxx\n>       Order deny,allow\n>       Deny from env=AUTHREQUIRED\n>       Satisfy any\n>       </Files>\n>\n>\n>       <Location /git/ABC>\n>       AuthType Basic\n>       AuthBasicProvider ldap\n>       AuthLDAPURL \"ldaps://xxxxxxxxxxxxxxx)\"\n>       AuthLDAPBindDN  \"uid=xxxxxxxxxxxx\"\n>       AuthLDAPBindPassword xxxxxxxxxxxxxxx\n>       AuthName \"Git Access ABC\"\n>       Require user xxxxx xxxxx xxxxx\n>       Order deny,allow\n> </Location>\n>\n>\n>\n> The /var/www/git/gitweb.cgi file has the default settings.\n>\n> ...\n> our $GIT = \"/usr/bin/git\";\n>\n> # absolute fs-path which will be prepended to the project path\n> our $projectroot = \"/var/lib/git\";\n> #our $projectroot = \"/export/gitrepos\";\n>\n> ...\n>\n>\n> If I set $projectroot to point to /export/gitrepos, I can see a list\n> of projects when I browse to https://myserver.domain.com/git-\n> however I wanted to minimize how much information was exposed with no\n> authentication.      And it didn't fix the access problem.\n> The \"git\" command is in the default OS path.   changing\n>        our $GIT = \"/usr/bin/git\";\n> to\n>       our $GIT = \"git\";\n>\n> did not help.\n>\n>\n> The only thing in the httpd error logs that looks relevant is\n>\n> [Sat Aug 17 15:39:39.826265 2019] [core:info] [pid 15870] [client\n> xxxxx] AH00128: File does not exist: /var/www/git/ABC/\n> [Sat Aug 17 15:39:44.831598 2019] [ssl:info] [pid 15870] (70007)The\n> timeout specified has expired: [client xxxxx] AH01991: SSL input\n> filter read failed.\n>\n>\n> selinux is disabled.\n>\n> Since I am getting an authentication prompt with \"Git Access ABC\" in\n> the dialog box it seems clear that the project root is being picked up\n> from  /etc/httpd/conf.d/gitrepos.conf and that the\n> /usr/libexec/git-core/git-http-backend script is being run.\n>\n>\n> Appreciate any advice.\n>\n> Thanks\n"}]}