【问题标题】:When accessing remote Mercurial server I just get a printout of the hgweb.cgi python script访问远程 Mercurial 服务器时,我只得到 hgweb.cgi python 脚本的打印输出
【发布时间】:2020-08-15 17:18:20
【问题描述】:

我正在尝试重建我的 Banana Pi 服务器,但发生了灾难性的 HDD 故障。我已经备份了所有存储库,但我无法让 Web 服务器在 Armbian Linux(本质上是 Ubuntu,仅适用于小型 ARM 板)上运行。

我已按照此处的说明进行操作:

https://www.mercurial-scm.org/wiki/HgWebDirStepByStep

但是当我转到 pi/hg 时,以前我会得到我所有存储库的列表,我只是得到 hgweb.cgi 脚本被打印出来:

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also http://mercurial.selenic.com/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "hgweb.config"

# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
#import sys; sys.path.insert(0, "/path/to/python/lib")

# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()

from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)

当然我不能从远程机器推送到存储库,我收到错误 404。

认为该脚本是我之前运行的脚本。它看起来与 Mercurial 安装中的示例相同,但具有:

config = "hgweb.config"

所以,问题是:

该脚本看起来正确吗? 我是否应该安装一些东西让 wsgicgi 工作。事实上,我什至应该使用它吗? 您需要任何其他信息来解决此问题吗?

非常感谢。

【问题讨论】:

    标签: apache ubuntu mercurial


    【解决方案1】:

    FWIW,我发现其他人也遇到了类似的问题,他们更改为 hgweb.wsgi,所以我试了一下,它可以工作。也许更高版本的 mercurial 和/或 apache 不喜欢旧方法。

    【讨论】:

      猜你喜欢
      • 2020-03-07
      • 2015-06-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-17
      • 2015-04-03
      • 1970-01-01
      • 1970-01-01
      • 2012-04-20
      相关资源
      最近更新 更多