subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Plewnia" <christianplew...@gmx.de>
Subject Subversion Ruby Binding: Server certificate verification failed: issuer is not trusted
Date Thu, 11 Apr 2013 18:51:26 GMT
Hi,

I have been trying for some hours to use the ruby subversion binding to 
do a repository checkout. Unfortunately, the server certificate is not 
accepted: 

$ /.../script.rb
/usr/lib/ruby/site_ruby/1.9.1/svn/util.rb:99:in `svn_client_checkout3':  (Svn::Error::RaDavRequestFailed)
Svn::Error::RaDavRequestFailed: OPTIONS of 'https://...': Server certificate verification
failed: issuer is not trusted (https://...)
        from /usr/lib/ruby/site_ruby/1.9.1/svn/util.rb:99:in `checkout3'
        from /usr/lib/ruby/site_ruby/1.9.1/svn/client.rb:143:in `checkout'
        from /.../script.rb:22:in `<main>'

Using the SVN client from command line I never faced any certificate 
issues (as far as I know the certificate is perfectly valid). However, I 
started looking for a way to make the ruby script accept the 
certificate. As to my knowledge there is no documentation for the ruby 
binding, so I looked into the ruby files of the ruby binding and into 
the documentation of the C binding but I could not find a solution. 

The script (see below) is taken from the best piece of documentation I 
could find in the web: 

http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/

Does anyone know how to deal with this problem?

Kind regards
Christian

PS: Please put me into CC as I am not subscribed to the list. Thanks!

My ruby script: 
------------------------------------------------------------------------
#!/usr/bin/env ruby

# Required packages
require "svn/core"
require "svn/ext/core"
require "svn/client"
require "svn/wc"
require "svn/repos"

config_username = '...'
config_password = '...'
config_repository_url = '...'
config_output_path = '...'
config_revision = 1

ctx = Svn::Client::Context.new()
ctx.add_simple_provider
ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_USERNAME] = config_username
ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_PASSWORD] = config_password

begin
	ctx.checkout(config_repository_url, config_output_path, config_revision.to_i, nil)
	rescue Svn::Error::CLIENT_UNRELATED_RESOURCES => e # revision doesn't exist
	raise "no such revision " + revision.to_s + " at " + repos_uri
end
------------------------------------------------------------------------

Mime
View raw message