Skip to contentSkip to conversation

svnimport: support repositories requiring SSL authentication

PATCH New Eric Wong 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore

Eric Wong

author
#0 lore raw

PATCH 1/1 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

---

 git-svnimport.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

926c84c0c96e43ca0341b541ed23e0f3874b8171

git-svnimport.perl +4 -2
index cb241d1..6e3a44a 100755
@@ -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;
Signature · 1 line
1.0.GIT