yaourt Proxy Settings

In Arch Linux, getting yaourt that is being run as normal user (which is a requirement of the program) to work with proxy was a bit of a challenge.

On my system I have proxy settings setup this way:

/etc/profile.d/proxy.sh
http_proxy=http://proxy.corp.com:8080/
ftp_proxy=http://proxy.corp.com:8080/
all_proxy=socks://proxy.corp.com:8080/
https_proxy=http://proxy.corp.com:8080/
no_proxy=localhost,127.0.0.0/8

export http_proxy;
export ftp_proxy;
export all_proxy;
export https_proxy;
export no_proxy;

When run as normal user yaourt relies on sudo to call pacman to perform package management in the system. The trouble is that when sudo is invoked by yaourt it doesn’t keep your *_proxy variables. The solution is to tell sudo to explicitly keep those variables whenever it’s invoked.

Continue reading

Advertisements