apache - Mercurial: "remote: ssl required"即使推送到 HTTPS 存储库

标签 apache ssl mercurial

我的 Apache 和 hgwebdir.cgi 通过 HTTPS(使用自签名证书)运行良好,我可以通过浏览器查看存储库并在本地克隆它。我不知道它是否有任何效果,但我正在重写 URL 以使其更漂亮:

$ cat .htaccess
Options +ExecCGI
RewriteEngine On
RewriteBase /public
RewriteRule ^$ hgwebdir.cgi  [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) hgwebdir.cgi/$1  [QSA,L]

但是,当我尝试运行 hg push 将更改发回时,我得到了这个:

$ hg push
pushing to https://<repository>
searching for changes
http authorization required
realm: Mercurial
user: virtualwolf
password: 
remote: ssl required

Apache 设置为将 HTTP 上的所有请求重定向到 HTTPS。远程服务器运行 CentOS,Apache 2.2.3 和 Mercurial 1.3.1(均通过 yum 安装)。

我对这个问题进行了大量搜索,最接近答案的是 this但它指的是 NGINX 而不是 Apache。

谢谢!

最佳答案

您可以通过像这样运行 hg 服务器来解决此问题(无推送 ssl):

hg serve --config web.push_ssl=No --config "web.allow_push=*"

关于apache - Mercurial: "remote: ssl required"即使推送到 HTTPS 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5683999/

相关文章:

php - 如何允许 apache 发送电子邮件?

apache - 我的 WSGI 应用程序无法作为 Python 模块加载。我究竟做错了什么

apache - 不受信任的证书 - Apache 和 StartSSL

java - SSL 问题 - TFS 的 Jenkins 从站连接问题

php - .htaccess/php 来流式传输视频?

ssl - Azure 应用程序证书

version-control - 从CS-RCS迁移到Mercurial

eclipse - 两个MercurialEclipse插件站点之间有什么关系?

python - 维护 ipython 笔记本的两个版本

Java 从 Apache poi 获取 excel 单元格背景颜色