Code

svnimport: support repositories requiring SSL authentication
authorEric Wong <normalperson@yhbt.net>
Sun, 1 Jan 2006 21:25:47 +0000 (13:25 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 6 Jan 2006 04:28:14 +0000 (20:28 -0800)
I looked at svn-mirror to see how it did this, seems about right.
"It works for me" when using it against https://svn.musicpd.org

tested command-line: git-svnimport -C mpc -i -m -v  \
-T mpc/trunk -b mpc/branches -t mpc/tags https://svn.musicpd.org

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svnimport.perl

index cb241d1b5174fad6b6eb081635e614d251688f0d..6e3a44a2bc9fbf170db45a7e390d6ac8ffbb6f02 100755 (executable)
@@ -96,8 +96,10 @@ sub new {
 sub conn {
        my $self = shift;
        my $repo = $self->{'fullrep'};
-       my $s = SVN::Ra->new($repo);
-
+       my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider,
+                         SVN::Client::get_ssl_server_trust_file_provider,
+                         SVN::Client::get_username_provider]);
+       my $s = SVN::Ra->new(url => $repo, auth => $auth);
        die "SVN connection to $repo: $!\n" unless defined $s;
        $self->{'svn'} = $s;
        $self->{'repo'} = $repo;