【问题标题】:setup git server/web with lighttpd: gives ...git-upload-pack not found使用 lighttpd 设置 git server/web:给出 ...git-upload-pack not found
【发布时间】:2013-07-21 16:04:56
【问题描述】:

我已经设置了 lighttpd 和 gitweb。如下创建了一个空存储库:

$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

在浏览器中我可以浏览这个存储库,但是当我尝试从命令行克隆它时,我得到:

$> 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?

而且,也许它有帮助,这是我的 lighttpd 配置

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"
)

我确实运行了“git update-server-info”,但没有成功! 有什么建议么 ?

【问题讨论】:

    标签: lighttpd gitweb


    【解决方案1】:

    有时是git 可执行路径问题。可以在this question 找到解决方案。

    此外,如果您有权访问 lighttpd 服务器日志,请检查 error.log 并验证 url 是否正确。如果服务器 conf 使用重定向,则还必须使用正确的别名访问 git 存储库。这是来自this question 的答案的建议。这个话题也在this question处理。

    github info webpage 指出服务器(由 http 服务器使用)和您的客户端之间的 git 版本差异可能会导致此类问题。 This webpage 描述了如何在 ubuntu 服务器上将 git 升级到最新的稳定版本(如果您使用的是 LTS,则很有用)。

    Sitaram 添加了一些关于如何正确设置的文档here

    我在安装 apache 时遇到了类似的问题,但尚未找到解决方案。

    【讨论】:

      猜你喜欢
      • 2012-07-30
      • 2013-07-30
      • 2020-09-15
      • 2015-02-11
      • 2013-02-25
      • 2012-03-16
      • 2012-05-07
      • 1970-01-01
      • 2012-06-23
      相关资源
      最近更新 更多