2

I've setup lighttpd and gitweb. Created an empty repository as follows:

$server> git --version
git version 1.7.11.7
$server> git --bare init p1
$server> cd p1
$server> git update-server-info
$server> cd ..
$server> chown -R lighttpd:lighttpd p1

In the browser I can browse this repository, but when I try to clone it from the command line I get:

$> git clone https://example.com/git/project.git p1
Cloning into 'p1'...
fatal: https://example.com/git/project.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

And, maybe it helps, here is my lighttpd configuration

alias.url += (
  "/static/gitweb.css"      => "/var/www/git/static/gitweb.css",
  "/static/git-logo.png"    => "/var/www/git/static/git-logo.png",
  "/static/git-favicon.png" => "/var/www/git/static/git-favicon.png",
  "/static/gitweb.js"       => "/var/www/git/static/gitweb.js",
  "/git"                    => "/var/www/git/gitweb.cgi"
)

I did run 'git update-server-info', without success! Any suggestions ?

Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333

1 Answers1

0

Sometimes it's a git executable path problem. Solutions might be found at this question.

Also, if you have access to the lighttpd server log, check the error.log and verify that the url is correct. If the server conf uses redirects, then the git repos must also be accessed using the correct, aliased names. This is a suggestion from answers to this question. This topic is also handled in this question.

This github info webpage points out that version differences of git between server (as used by the http server) and your client can cause such an issue. This webpage describes how to upgrade git to the latest stable version on an ubuntu server (useful if you're using an LTS).

Sitaram has added some documentation on how to set this up correctly here.

I have a similar problem with an apache setup and not yet found the solution.

Community
  • 1
  • 1
cfi
  • 10,915
  • 8
  • 57
  • 103