Merge pull request #4188 from oliverguenther/fix/4197-svn-ssl-checks

Existing SVN repositories: Add option to accept ssl certificates
pull/4220/head
Oliver Günther 9 years ago
commit e720958ed7
  1. 1
      config/configuration.yml.example
  2. 10
      lib/open_project/scm/adapters/subversion.rb

@ -274,6 +274,7 @@ default:
# manages: /opt/repositories/git
# subversion:
# client_command: /usr/local/bin/svn
# trustedssl: true
# disabled_types:
# - :existing
# manages: /opt/repositories/svn

@ -102,8 +102,10 @@ module OpenProject
return if doc.at_xpath('/info/entry/repository/uuid')
raise Exceptions::ScmUnauthorized.new if io_include?(stderr,
'E215004: Authentication failed')
stderr.each_line do |l|
Rails.logger.error("SVN access error: #{l}") if l =~ /E\d+:/
raise Exceptions::ScmUnauthorized.new if l.include?('E215004: Authentication failed')
end
end
raise Exceptions::ScmUnavailable
@ -226,6 +228,10 @@ module OpenProject
args.push('--password', @password) if @password.present?
end
if self.class.config[:trustedssl]
args.push('--trust-server-cert')
end
args.push('--no-auth-cache', '--non-interactive')
end

Loading…
Cancel
Save