Description of problem: when you run a yum command like 'sudo yum upgrade' or 'sudo yum install <package>' , it doesn't work. doing a 'export http_proxy=http://proxy:8080' or adding the line 'proxy=http://proxy:8080' in /etc/ yum.conf doesn't change a thing. works only if yum is started from a real root console. Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1.be a user declared in the sudoers 2.launch 'sudo yum upgrade' 3. Actual results: yum fails to find the repositories Expected results: yum working Additional info:
additional infos : even launched from a root console (after doing a 'su' or 'su -'), you still need to enter 'export http_proxy=http://proxy:8080' before issuing the 'yum upgrade' command. The parameter 'proxy=http://proxy:8080' in /etc/yum.conf is ignored.
By default, sudo now does some environment cleaning and only retains a certain set of env vars to avoid the never-ending exploits due to preserved environmental variables. See /etc/sudoers for the list of what's kept. proxy in yum.conf should work though
(In reply to comment #2) > proxy in yum.conf should work though Well it doesn't ... here's an example output, the line 'proxy=http://proxy:8080' is present in /etc/yum.conf. [root@yuri ~]# yum upgrade Loading "installonlyn" plugin Setting up Upgrade Process Setting up repositories livna [1/4] core [2/4] Cannot find a valid baseurl for repo: core Error: Cannot find a valid baseurl for repo: core [root@yuri ~]# export HTTP_PROXY=http://proxy:8080 [root@yuri ~]# yum upgrade Loading "installonlyn" plugin Setting up Upgrade Process Setting up repositories livna [1/4] core [2/4] updates [3/4] extras [4/4] Reading repository metadata in from local files No Packages marked for Update/Obsoletion
(In reply to comment #2) > By default, sudo now does some environment cleaning and only retains a certain > set of env vars to avoid the never-ending exploits due to preserved > environmental variables. See /etc/sudoers for the list of what's kept. to be complete, the result as shown in comment #3 is ALSO true when running yum from a real root login, not only a 'sudo' or a 'su'.
*** This bug has been marked as a duplicate of 185309 ***