Debootstrap through authenticated proxy

I install debian on my computer using the "from another linux" method, and I have a problem with debootsrapt, which cannot go through our proxy. Since I understand that debootstrap does not have a configuration file, it does not accept arguments on the command line (related to the proxy), so I set the following two environment variables:

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

However, I get:

 # /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 obtained through the browser, so it exists and so on ...

I wonder if this can be done at all.

thanks

+4
source share
3 answers

Well, I have to answer my own question.

With strace, I found that debootstrap calls wget to retrieve files from repositories. Obviously, the environment variables were somehow ignored, but I edited / etc / wgetrc and set all the proxy related settings there.

So it works.

BTW: debootstrap itself is just a script, so other workarounds may be possible.

+6
source

You need to export 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 

In addition, if you try to install them from the user shell and then use sudo to run debootstrap, these variables may not work, so it’s better to set them after getting to the root shell.

+1
source

Try changing the APT proxy:

 $ cat /etc/apt/apt.conf.d/30proxy Acquire::http::proxy "http://proxy:4128"; Acquire::https::proxy "https://proxy:4128"; 
0
source

Source: https://habr.com/ru/post/1486765/


All Articles