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:

ftp_proxy=http://myname:mypasswd@proxy.bla.bla.com:4128
http_proxy=http://myname:mypasswd@proxy.bla.bla.com:4128

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

Thanks

Answers


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:mypasswd@proxy.bla.bla.com:4128
# http_proxy=http://myname:mypasswd@proxy.bla.bla.com: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";

Need Your Help

Responsive divs covering other content on resize

html css responsive-design

I have three responsive divs inside a div. All is well until I resize, and the divs will sit on top of the content just below it.

Restore mysqldump with binary data from EF migration history table

mysql sql mysqldump ef-migrations

I'm trying to restore a database from a dump generated with mysqldump. However it contains binary data.