Pamac behind proxy

Hi there all,

I’m trying to update AUR based packages through pamac. My configuration is proxy exclusive, including DNS resolutions. Retrieving the packages DB’s etc seems to work through the proxy although the “Cloning build files” step seems to be willing to engage direct communications.

Is there a way to alter these behaviors? I’ve mangled with:

These lines are present in my /etc/environment

export http_proxy=http://proxy_fqdn:8080/
export {https,ftp,rsync,dns,all}_proxy=$http_proxy 

An output from a failing attempt at pamac, I’d be interested if one’s know how that “Cloning build files” process is actually launched and if there is anything under my control to possibly alter/modify it’s behaviors:

sudo pamac update --aur
Warning: Building packages as dynamic user
Warning: Setting build directory to /var/cache/pamac
Synchronizing package databases...
Refreshing AUR...                                                                                                                                                                                                                                    
Checking xorgxrdp-git dependencies...
Checking python2 dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (2):
  python2          2.7.18-6        (2.7.18-5)        AUR
  xorgxrdp-git     0.9.19-1        (0.2.18-1)        AUR

Edit build files : [e] 
Apply transaction ? [e/y/N] y

**Cloning python2 build files...**
Running as unit: run-u1677.service
fatal: unable to access '': Failed to connect to port 443 after 129518 ms: Connection timed out
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 2min 9.546s
CPU time consumed: 29ms
Error: Failed to build python2

On a note here, pacman updates works all fine behind the proxy (sudo pacman -Syyuu).

Thanks a lot,
Kind regards,

As a workaround, have you tried proxychains-ng?

Hi there,

Thanks for the proposal, I’ll test it out. Meanwhile I went a little bit further and found something that works on the downloads side:

export proxy=http://proxy_fqdn:port/
alias proxypamac='http_proxy=$proxy https_proxy=$proxy pamac update --aur --no-confirm --force-refresh'

I still don’t really get why I need to “force” the http(s)_proxy variable as its already set in the environment but well, that works mind you…

I’ll test proxychain to see if there is anything better out of that.


Hi @mokaz,


Some programs, such as wget and (used by pacman) CURL, use environment variables of the form protocol_proxy to determine the proxy for a given protocol (e.g. HTTP, FTP, …).

Below is an example on how to set these variables in a shell:

export http_proxy=
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,,localaddress,"

Some programs look for the all caps version of the environment variables.

Try removing “export” from the beginning of the lines in /etc/environment so it only contains KEY=VALUE lines.
The file /etc/environment is owned by PAM and supports lines having the “export” keyword to be compatible with bash syntax. But it does not look like it is supported by Systemd services (at least it is not mentioned in the documentation) and it looks like Pamac uses Systemd services for the AUR builds. See

man pam_env
man environment.d