Redmine版本:3.4.4.stable redmine_git_hosting插件版本:1.2.3 gitolite v.3
HTTPS仅访问存储库。 我可以克隆OK但是在推送时我得到以下错误:
fatal: Authentication failed for '<repo URL>'
在git_hosting.log的服务器端,我收到以下错误:
SmartHttp : your are trying to push data without SSL!, exiting !
我对这个问题的真正原因感到困惑
我的虚拟主机redmine配置文件是:
`<VirtualHost *:443>
ServerName .....
ServerAlias ......
ServerAdmin ....
DocumentRoot /opt/redmine/public
PassengerRuby ......
PassengerFriendlyErrorPages on
ErrorLog /var/log/httpd/redmine-error_log
CustomLog /var/log/httpd/redmine-access_log common
<Directory "/opt/redmine">
Require all granted
# MultiViews must be turned off
Options -MultiViews
</Directory>
PerlLoadModule Apache::Authn::Redmine
<Location />
Order allow,deny
Allow from all
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
RedmineDSN "DBI:Pg:database=redmine;host=127.0.0.1"
RedmineDbUser "redmine"
RedmineDbPass "xxxxx"
RedmineGitSmartHttp yes
</Location>
</VirtualHost>`
Thanx事先提供任何帮助!
答案 0 :(得分:1)
好的,我已经弄明白了(对于晦涩难懂的错误信息而言,不是这样)。我必须是唯一使用https的人! 基本上我的虚拟主机配置缺少SSL的3个条目:
SSLEngine on
SSLCertificateFile
SSLCertificateKeyFile
答案 1 :(得分:0)
当您通过HTTP / HTTPS与Git对话时,这是SSL终止的问题。
如果您在NGINX反向代理后面使用Redmine,则应添加一个额外的标头以保留有关原始请求方案的信息:
proxy_set_header X-Forwarded-Proto $scheme;
对于执行SSL终止的Apache,其值应为:
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
在您的情况下,您正在听*:443,但未为您的虚拟主机指定SSL证书设置。另一种选择是在Redmine设置下为SmartHTTP设置“仅HTTP”。