@matheusbsbs / matheus-bagliano / commits / 2961e0ee8b
Fork 0

svnimport: support repositories requiring SSL authentication

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>

Eric Wong committed Jan 1, 2006 at 13:25 UTC 2961e0ee8b3c49853f2da4b485d4e3851e973e9d
1 file changed +4 -2
git-svnimport.perl
+4 -2
@@ -96,8 +96,10 @@ sub new {
96 sub conn {
97 my $self = shift;
98 my $repo = $self->{'fullrep'};
99 - my $s = SVN::Ra->new($repo);
100 -
99 + my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider,
100 + SVN::Client::get_ssl_server_trust_file_provider,
101 + SVN::Client::get_username_provider]);
102 + my $s = SVN::Ra->new(url => $repo, auth => $auth);
103 die "SVN connection to $repo: $!\n" unless defined $s;
104 $self->{'svn'} = $s;
105 $self->{'repo'} = $repo;