I’ve been struggling with some developers recently who keep claiming a firewall issue was occurring when they were trying to reach out to the internet. Like most corporate environments everything is required to proxy out to the internet.. They kept sending me screen shot after screen shot of them trying to wget a repo out on the web but it was attempting to wget directly out to the internet… Now when I login with root I would just wget sitename/*.repo and it would pull everything down fine through the proxy.. I logged into their user account and did the same thing without issues… Again I was perplexed how they were messing this up as the environmental variables are exported automatically through a bash script thrown in /etc/profile.d/..
Heres what I saw when they were doing it on there end:
When I would login with their account this is what I saw:
You can see from the above this certainly is not a system problem right? Using wget goes out through the proxies as expected and grabs the file I want without issues. Then I noticed they were using sudo literally in front of every command they were putting in and it occurred to me that this is bypassing my environmental variables I set through my proxy script in /etc/profile.d/.. SO here is how you fix it:
Look for this section
Add a line underneath the last line in this section that looks like this
So the section should look like this now:
Write and quit the file and everything will be fixed provided your env variables are set correctly.