Everton Barros
Everton Barros

Reputation: 71

Redmine 2.3.2 svn HTTPs Server SSL certificate untrusted

I made following configuration:

  1. In Centos 6.4 I installed redmine 2.3.2, apache2 passenger module and SVN 1.7.11. I configured to run redmine on apache and so far everything is working perfectly.

  2. In Windows server 2008 I installed VisualSVN Server compatible with SVN 1.7. so far everything is working perfectly.

  3. Problem when I try to integrate svn installed on windows server with redmine installed Centos, I get the error:

    svn: E230001: Unable to connect to a repository at URL 'https://xxx.xxx.x.xxx/svn/myrepo'

    svn: E230001: Server SSL certificate untrusted

I've accepted the certifcate permanently to the folder   /var/www/svn

I pointed to the certificate in permanent settings file /var/www/redmine/lib/redmine/scm/ adapters/subversion_adapter.rb

def credentials_string
 str =''
 str << "- config-dir /var/www/svn - username # {shell_quote (@ login)}" [email protected]?
 str << "- password # {shell_quote (@ password)}" [email protected]? | | @ Password.blank?
 str << "- trust-server-cert - no-auth-cache - non-interactive"
 str 
end

And the time to click on the tab redmine repository get the exception above.

How do I fix this problem? Any idea?

Upvotes: 1

Views: 2477

Answers (2)

Everton Barros
Everton Barros

Reputation: 71

After doing several tests, I found that the problem is in apache, ie, by running by 3000 with the command ruby script / rails server webrick-e production works normally but when run by apache gives the error above. How to fix it in apache?

Problem solved. The following settings were made

  1. File /var/www/redmine/lib/redmine/scm/adapters/subversion_adapter.rb

    def credentials_string
     str = ''
     str << " --username #{shell_quote(@login)}" unless @login.blank?
     str << " --password #{shell_quote(@password)}" unless @login.blank? || @password.blank?
     str << " --no-auth-cache --non-interactive --config-dir /tmp/subversion_config"
     str
    end
    
  2. And to accept the certificate permanently so I did:

    svn ls --config-dir /tmp/subversion_config --config-option config:auth:store-auth-creds=yes https://xxx.xxx.x.xxx/svn/myrepo/

  3. Added permission folder:

    chown-R apache: apache /tmp/subversion_config

  4. References:

    http://www.redmine.org/projects/redmine/wiki/Redmine_203_with_Subversion_and_LDAP_Authentication_(for_Redmine_and_Subversion_through_Redmine)_on_Centos_6_i386_-_detailed

    http://www.redmine.org/issues/787

Upvotes: 1

bahrep
bahrep

Reputation: 30662

Make sure that the certificate on VisualSVN Server matches it's hostname (it's case-sensitive)! --trust-server-cert won't automatically accept certificate with non-matching hostname since it's considered insecure.

Upvotes: 0

Related Questions