Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created March 23, 2010 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petyosi/9893f77e9f4729ed1112 to your computer and use it in GitHub Desktop.
Save petyosi/9893f77e9f4729ed1112 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'svn/core'
require 'svn/client'
context = Svn::Client::Context.new
context.add_username_provider
context.add_ssl_server_trust_file_provider.
context.add_ssl_server_trust_prompt_provider(proc { true })
auth_proc = proc { |credential_instance, unused, unused, unused|
credential_instance.username = 'username'
credential_instance.password = 'password'
}
context.add_simple_prompt_provider 1, auth_proc
context.checkout('https://path/to/repo', '/home/petyo/repo', 'HEAD', nil, nil, false, true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment