Skip to content

redmine with smart http and redmine_git_hosting does not allow pushing to repository #717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue May 27, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented May 27, 2018

Redmine version: 3.4.4.stable
redmine_git_hosting plugin version: 1.2.3
gitolite v.3

HTTPS only access to repositories. I can clone OK but when pushing I get the following error:

fatal: Authentication failed for ''

On the server side in the git_hosting.log I get the following error however:

SmartHttp : your are trying to push data without SSL!, exiting !

I am confused on what the real cause of the problem is

My virtual host redmine configuration file is:

`<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
`
@ghost
Copy link
Author

ghost commented May 27, 2018

OK, I've figured it out (no thanx to the obscure error messages). I must be the only one who is using https!
Basically my virtual host configuration is missing 3 entries re SSL:
SSLEngine on
SSLCertificateFile
SSLCertificateKeyFile

Can the documentation on the website page http://redmine-git-hosting.io/how-to/install-addons/ be update to reflect this? It may help someone from pulling the hair out like I did :-)

@afinello
Copy link

Actually, you have to pass the right headers to redmine to support https besides just configuring it with Apache:

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}

@PowerKiKi
Copy link
Collaborator

As discussed in #732 (comment), issues related to Redmine < 4.0 or severely outdated issues are being closed to help clean up the issue tracker.

If this issue is still relevant to you and you are running Redmine >= 4.0, please open a new issue including all new relevant information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants