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.
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.
I have reviewed everything I can think of. Am I missing something?
Do you configure you corporate proxy in Gnome's settings (in Network section)?
Also to clarify: do dnf fail when you're behind the proxy, or when you're not?
Also you can try curl -v 'https://mirrors.fedoraproject.org/met...' in the same setting and see if curl itself is successful or not, and if not -- does it tell you something useful.
Hi, I am not running Gnome, but Mate. For my user, Mate's "Network Proxy Preferences" is set to use a proxy.pac endpoint that is only reachable when I am in the corporate network. The file /etc/environment also has proxy configuration that shows up as http_proxy/https_proxy/no_proxy environment variables. When I am not in the corporate network, I run a script that unsets them. This strategy allows my user to run curl successfully everywhere (in/out corporate net) dnf works inside the corporate network, but not outside. If I understand where dnf gets this proxy from, I can fix it in the scrip.
I don't use proxy, so there's quite a small chance I can offer something useful, only if it's something generic enough, or something like looking with a fresh eye.
Observation 1. env and sudo env do give somewhat different results on my system. Am I correct in reading from you post/comment that curl 'https://mirrors.fedoraproject.org/metalink?repo=updates-released-f29&arch=x86_64' does get mirror list successfully?
How about sudo curl the_same_url?
Also you can try sudo -i dnf install *something* (-i sets the environment to more closely resemble user's one).
There can be some other switches to sudo that have something to do with environment variables, I don't know any of the top of my head, but that can be explored too.
Second suggestion is to try something like sudo NO_PROXY=* dnf install *something*, i.e. manually saying any proxies should not be used for this call of dnf.
Basically, the main idea is that environment is a bit different when you call for example curl and sudo curl.
Also from all I see you should be able to recreate the same behavior (i.e. errors) with just calling curl, not dnf itself.