Ask Your Question

Revision history [back]

dnf fails to install for some user due to unknown proxy setting

Hi, I am on fedora-29. The computer is 50% of the time behind a corporate proxy, 50% of the time without proxy.
The user account I normally use is part of the wheel group and can use sudo successfully.
In the network without proxy, after changing environment variables, I can use curl, browsers, etc without problems. I can use sudo to perform system changes successfully. But I cannot use dnf.

With my unprivileged account:

$ env |grep -i proxy
$ cat /etc/dnf/dnf.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True

But if I try to install any package with dnf, it fails. The error is this. I can confirm the same behaviour in /var/log/dnf.log:

Error: Error downloading packages:
Curl error (5): Couldn't resolve proxy name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f29&arch=x86_64 [Could not resolve proxy: my.proxy.corp]

I do not understand where is this proxy setting being pulled from. If I change to root, dnf works as expected.
I can install packages only from root. I can remove packages from any account... it only fails when trying to reach out.

$ sudo su -
# dnf install gitk
# dnf remove gitk
# exit
$ sudo dnf install gitk
Error: Error downloading packages:
$ sudo su -
# dnf install gitk
# exit
$ sudo dnf remove gitk
Complete!
$ sudo dnf install gitk
Error: Error downloading packages:

I have reviewed everything I can think of. Am I missing something?