I tried the credentials suggestion but was not able to figure out the realm needed

This worked

diff --git a/debmirror b/debmirror
index 3345ec0..d5a4d2c 100755
--- a/debmirror
+++ b/debmirror
@@ -599,6 +599,7 @@ use Digest::SHA;
 use if $] lt "5.022", "Net::INET6Glue";
 use Net::FTP;
 use LWP::UserAgent;
+use MIME::Base64;

 our $version="1:2.29";

@@ -1801,11 +1802,11 @@ sub http_get {
   local $| = 1;
   my $file=shift;
   my $url;
-  if ($user eq 'anonymous'){
-    $url="$download_method://${host}/${remoteroot}/${file}";
-  }
-  else {
- $url="$download_method://${user}:${passwd}\@${host}/${remoteroot}/${file}";
+  $url="$download_method://${host}/${remoteroot}/${file}";
+
+  if ($user ne 'anonymous'){
+    my $auth = encode_base64("${user}:${passwd}", "");
+    $ua->default_header('Authorization' => "Basic $auth");
   }
   my $ret=1;

(END)

Reply via email to