debootstrap through authenticated proxy
I am to install debian on my PC by 'from other linux' method and I run into problem with debootsrapt not being able to go through our proxy. As I understand the debootstrap doesnt have config file neither takes arguments on command line (relating to proxy), so I set following two environment variables:
Still I am getting:
# /usr/sbin/debootstrap --arch i386 wheezy /mnt/debinst http://ftp.cz.debian.org/debian I: Retrieving Release E: Failed getting release file http://ftp.cz.debian.org/debian/dists/wheezy/Release
the Release file can be get via browser, so it exists and so on...
I wonder if this can be done at all
Well, I am to answer my question by myself.
With strace I found that debootstrap calls wget to fetch files from repositories. Obviously environment variables were somehow ignored but I edited /etc/wgetrc and put there all proxy related settings.
So it works.
BTW: debootstrap itself is just a script so maybe other workarounds would be possible.
You need to export the environment variables after setting them.
# ftp_proxy=http://myname:email@example.com:4128 # http_proxy=http://myname:firstname.lastname@example.org:4128 # export ftp_proxy http_proxy # /usr/sbin/debootstrap --arch i386 wheezy /mnt/debinst http://ftp.cz.debian.org/debian
Also, if you try to set them from a user shell and then use sudo to run debootstrap, those variables may not pass through so it's better to set them after getting to a root shell.
Try changing APT proxy things :
$ cat /etc/apt/apt.conf.d/30proxy Acquire::http::proxy "http://proxy:4128"; Acquire::https::proxy "https://proxy:4128";