[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt-get and http authentication



I can't get apt-get to do http authentication. It seems sources.list
doesn't support http://user:pwd@host/ type URI:s. The manuals do mention
authentication to http-proxies, but not authentication to the site.  Am I
doing something wrong or is this something apt-get can't do (I hope not).

My system is potato with apt-0.3.18. A small demonstration of how apt-get
update fails follows. If the server doesn't require authentication the
same command succeeds.

sources.list:
deb http://xxx:yyy@www.lifix.fi:80/ftp/pub/lifix /

apt-get update fails:
$ sudo apt-get update
Err http://www.lifix.fi  Packages
  401 Authorization Required
Ign http://www.lifix.fi  Release
Failed to fetch http://xxx:yyy@www.lifix.fi:80/ftp/pub/lifix/Packages
  401 Authorization Required
Reading Package Lists... Done
Building Dependency Tree... Done
E: Some index files failed to download, they have been ignored, or old ones used instead.

wget succeeds with a similar url:
$ wget http://xxx:yyy@www.lifix.fi:80/ftp/pub/lifix/Packages.gz
--18:24:18--  http://xxx:xxx@www.lifix.fi:80/ftp/pub/lifix/Packages.gz
           => `Packages.gz.1'
Connecting to www.lifix.fi:80... connected!
HTTP request sent, awaiting response... 401 Authorization Required
Connecting to www.lifix.fi:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,626 [text/plain]

    0K -> .                                                      [100%]

18:24:18 (1.55 MB/s) - `Packages.gz.1' saved [1626/1626]

--
Anton Gyllenberg <anton@iki.fi>


Reply to: