Git using Virtualmin on CentOS 6 and 7

I posted this to the forums and nobody answered. https://www.virtualmin.com/node/39306

Since then I setup CentOS 7 and Virtualmin on a different server and tried to get Git working, but I get the same error.

[Wed Feb 17 19:04:53.636903 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: defined(@array) is deprecated at gitweb.cgi line 1193.
[Wed Feb 17 19:04:53.636977 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: \t(Maybe you should just omit the defined()?)
[Wed Feb 17 19:04:53.637304 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: defined(@array) is deprecated at gitweb.cgi line 1246.
[Wed Feb 17 19:04:53.637334 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: \t(Maybe you should just omit the defined()?)
[Wed Feb 17 19:04:53.638071 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: defined(@array) is deprecated at gitweb.cgi line 1324.
[Wed Feb 17 19:04:53.638103 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: \t(Maybe you should just omit the defined()?)
[Wed Feb 17 19:04:53.638548 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: defined(@array) is deprecated at gitweb.cgi line 1376.
[Wed Feb 17 19:04:53.638576 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: \t(Maybe you should just omit the defined()?)
[Wed Feb 17 19:04:53.651816 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Can't exec "/bin/git-rev-parse": No such file or directory at gitweb.cgi line 466.
[Wed Feb 17 19:04:53.652734 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value $commit_id in concatenation (.) or string at gitweb.cgi line 587.
[Wed Feb 17 19:04:53.653482 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Can't exec "/bin/git-rev-list": No such file or directory at gitweb.cgi line 587.
[Wed Feb 17 19:04:53.654006 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value $epoch in gmtime at gitweb.cgi line 813.
[Wed Feb 17 19:04:53.654125 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value $epoch in addition (+) at gitweb.cgi line 823.
[Wed Feb 17 19:04:53.658176 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 129.
[Wed Feb 17 19:04:53.658238 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 130.
[Wed Feb 17 19:04:53.659366 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Can't exec "/bin/git-rev-parse": No such file or directory at gitweb.cgi line 466.
[Wed Feb 17 19:04:53.659938 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Use of uninitialized value in concatenation (.) or string at gitweb.cgi line 1144.
[Wed Feb 17 19:04:53.660756 2016] [cgi:error] [pid 28016] [client 24.234.153.178:59934] AH01215: [Wed Feb 17 19:04:53 2016] gitweb.cgi: Can't exec "/bin/git-rev-list": No such file or directory at gitweb.cgi line 1144.

I hope I posted this in the right place because I bought the premium support to help fix this error.

Status: 
Closed (fixed)

Comments

It looks like the real problem is that the command git-rev-parse doesn't exist in the /bin directory as expected. Does that command exist anywhere on your system?

When I use the find / -iname "git-rev-parse" it says /usr/libexec/git-core/git-rev-parse

Ok, files in that dir should be found. Can you attach the file gitweb.cgi from the domain's cgi-bin directory to this bug report, so I can see what's going wrong?

This is the gitweb.cgi file that is in /home/username/domains/hostname/pulic_html/git. Is that the folder you are talking about?

Thanks, that's the file. Try changing the line :

my $gitbin = '/bin';

to :

my $gitbin = '/usr/libexec/git-core';
Status: Active ยป Closed (fixed)

Fixed. Thanks.