PDA

View Full Version : RESOLVED: how to configure yum to get through proxy?



bopc
30th January 2004, 09:40 AM
So, I've installed FC1 on my laptop which dual-boots also with XP. Now, I'm using it at work so I'm behind a proxy server. I have configured Mozilla for the proxy, and set the proxy in the Network Proxy applet (Prefs menu). I can browse the net using Moz, but yum does not seem to "see" the proxy configuration. I run yum check-update and it just sits there for a bit, then starts the failover sequence (and eventually times out looking for servers). I'm configured for DHCP. What else needs to be configured for yum to get through the proxy?

If all else fails, I can always update from home via my cable connection (525kbps), but I have 10mb connection at work so it would be nice to get updates from there too.

bopc
30th January 2004, 11:49 AM
Ok, found the answer. First have to set the environment variable for yum:

http_proxy=proxy:portnum

Then, export the variable:

export http_proxy

Then run yum as usual. Works fine now.

RossCampbell
31st January 2004, 09:51 PM
create the following files in /etc/profile.d, and then this will work in *any* shell for *any* user of the system

#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/

cybrjackle
2nd February 2004, 03:39 PM
I just add the following to bash_profile for my main user

# vi ~/.bash_profile

export http_proxy=http://ip:port

And use sudo for the user so I don't have to type anything to get yum to run everday at work.

vorte[x]
2nd February 2004, 08:25 PM
Can a mod or the original creator of this thread prefix the subject line with "Resolved:" - Makes things a whole lot easier when trying to find people with unresolved issues. ;)

joking
13th February 2004, 11:48 PM
Well, that didn't work. Before I changed what was said needed to be changed or added I saw a red dot with an exclaimation point in it. When I pointed to it it said I had 124 updates waiting. Then when I clicked on the dot it would show the packages needing updating.

After making the changes. I logged out and then logged back in.

Now I have a blue dot with a check mark. It says Waiting for first checkin when I point at it and when I click on it it doesn't show anything at all.

I guess, I'll un-change what I did and reboot. And see if I can get back to the partial expected update recognition.

This is result of "yum update"

[root@home rhn]# yum update
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
retrygrab() failed for:
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/headers/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/headers/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found
[root@home rhn]#

at least now I am getting Errno 4 instead of Errno 7,

JMR
9th April 2004, 04:44 PM
Anyone have a fix for this yet? I also get a 404 error after setting the http_proxy variable.

FWIW, it's not a Yum issue. I get the same error using wget.

Jack

Jman
10th April 2004, 01:41 AM
Smilies disabled in certain posts, much more readable now.

Not that I don't like smilies. :)

NathanH
10th June 2004, 12:16 PM
I had the same problem. I fixed it by editing /etc/wgetrc and edited the following:

# Many sites are behind firewalls that do not allow initiation of
# connections from the outside. On these sites you have to use the
# `passive' feature of FTP. If you are behind such a firewall, you
# can turn this on to make Wget use passive FTP by default.
passive_ftp = on

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://host:port/
ftp_proxy = http://host:port/

You need to remove the comment (#) at the beginning of the last 2 lines shown here and at the beginning of the line containing passive_ftp.

HTH,
Nathan

leo.dearden
25th October 2004, 04:17 PM
Ok, found the answer. First have to set the environment variable for yum:

http_proxy=proxy:portnum

Then, export the variable:

export http_proxy

Then run yum as usual. Works fine now.

Something to note:

the URL that you use for 'proxy' has to be a complete URL. Specifically, you need to use (say):

http_proxy=http://proxy.foo.com:8888

instead of

http_proxy=proxy.foo.com:8888

The latter works with wget, but causes the python urllibs to break, since they expect the protocol type to be at the start of the URL.

This one had me scratching my head for a while ^_^

HTH,

Leo.

aussieaubs
4th November 2004, 01:12 PM
I thought I would just add that if you need to authenticate to your proxy and need to add a user id and password you will need to follow the following format:

http_proxy=http://user:passwd@proxy.foo.com:portnumber

and follow the same format with the other proxy variables (ftp_proxy etc). I know its not safe but i havent found a work around yet.... yum wont allow for password authentication...

Cheers
Ah-ha

zabilcm
15th November 2004, 05:47 AM
For people behind a windows proxy which uses NTLM authentication this link will help.

http://ntlmaps.sourceforge.net/

The above program should be run as a proxy on your desktop and all your connections should be directed through this.

jmellor
18th May 2005, 01:53 PM
I can't seem to get the proxy to work at all.

I think the problem is that I need the ability to pass a Microsoft domain as well as the Microsoft username and password to the proxy to do the authentication. Any ideas?

Mr.GoodBoy
26th August 2005, 04:18 PM
I am connected to college lan(T1) my direct connection is not working so tried above.my proxies are firewalled

http_proxy=http://144.16.192.245:8080
export http_proxy
[root@localhost ~]# yum install valknut
Setting up Install Process
Setting up repositories
http://ayo.freshrpms.net/fedora/linux/4/i386/core/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: core
failure: repodata/repomd.xml from core: [Errno 256] No more mirrors to try.
please help me how to solve this i am new to linux so explain in detail

previously i was trying to configure and get the gpg key there i have created files and got struck up at
like this

[root@localhost ~]# rpm --import --httpproxy http://144.16.192.245 --httpport 80 80 --ftpproxy http://144.16.192.245 --ftpport 8080 http://dag.wieers.com/packag es/RPM-GPG-KEY.dag.txt
error: http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt: import read failed(-1 ).
Segmentation fault
so i changed the gpgcheck to 0 as suggested by some one and got the above error in yum
please tell me how and what to configure i am new to linux and got fc4
frusttrated of these installations and dependencies

coolmohitz
3rd September 2005, 09:16 PM
Just copy paste this in your .bashrc and invoke it by the command proxy
This is a secure authentication method:

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password@proxy: port/"
export ftp_proxy="http://$username:$password@proxy: port/"
}

Z06
13th September 2005, 04:00 PM
I have a proxy at work, but no proxy at home. Is there a way to set it up to auto-detect so-to-speak? My yum does the same thing at work. At home no problems.

sighs
26th September 2005, 04:03 PM
Hello,
I have tried the environment variable approach and get:

http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/i386/repodata/repomd.xml: [Errno 4] IOError: HTTP Error 407: Server: Microsoft-IIS/4.0
Date: Mon, 26 Sep 2005 14:52:53 GMT
Connection: close
Proxy-Authenticate: NTLM
Trying other mirror.
Cannot open/read repomd.xml file for repository: updates-released
failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.

I have tried this with both the domain\username and username in the env var, same result. I have also tried the proxy.sh/proxy.csh suggestion in the post. Our proxy server is MS Proxy 2, not a good start. Any ideas?

Cheers, Sighs.

elliss
26th September 2005, 09:12 PM
Configuring yum to use a proxy server:

http://fedora.redhat.com/docs/yum/sn-yum-proxy-server.html

The proxy has to be compliant with HTTP 1.1 for yum to work. I haven't had to deal with MS Proxy Server or ISA, but I've seen another post on this forum here about ISA - IIRC the author couldn't get yum to work through it.

You could also try setting FTP URLs for the yum repositories - yum supports FTP.

jmellor
27th September 2005, 04:04 AM
This thread has been going for a considerable length of time now, and I have yet to see anybody come up with a way to authenticate against an MS proxy where you need to specify the domain. I know I still can't do it. Since this is arguably the most common form of proxy (rightly so or not, since most other platforms have little need for such abominations), and I see very little in usable replies to the problem, can I take in that this does not yet work, and that the problem is in fact, NOT RESOLVED?

fastandsimple
1st December 2005, 05:25 AM
When using a numbered form of an IP address, such as 192.168.0.3, the python libraries will incorrectly parse it unless http:// is placed in front of it. So:

http_proxy=192.168.0.3:80 will NOT work; must use the form:
http_proxy=http://192.168.0.3:80
(This took me a good 6 or 7 hours to figure out!)

GrahamA
21st February 2006, 09:41 AM
I managed to get it working by using the following line in the wgetrc file:

http_proxy = http://DOMAIN\USERID:password@proxyip:80/

Possibly something similar would work for yum?

I'm still working on the environment variable - I'm using Kubuntu on my IBM thinkpad. FC1- 4 at home.

GrahamA
21st February 2006, 09:45 AM
#!@# smilies

http_proxy = http://DOMAIN\USERID":"password@proxyip:80/

diehardy
24th February 2006, 01:42 PM
I had some tough time using YUM
But i heard that using YUMEX is easier and tried it

I was happy that YUMEX installation was successfull but.. its troubling me

I was trying to update Helix player on my system using "yumex" but its showing the following error

Error in Transaction /n Refusing to automatically import keys when running unattended.
Use "-y" to override


I am able to view all the
Installed packages, packages available to be upgraded but unfortunately i am not able to install them

This snap shot of watts happening...

14:51:17 : Setting up Update Process
14:51:29 : --> Populating transaction set with selected packages. Please wait.
14:51:30 : ---> Package HelixPlayer.i386 1:1.0.6-1.fc4.2 set to be updated
14:51:30 : --> Running transaction check

================================================== ===========================
Package Arch Version Repository Size
================================================== ===========================
Updating:
HelixPlayer i386 1:1.0.6-1.fc4.2 updates-released 3.8 M

Transaction Summary
================================================== ===========================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)

14:51:37 : Downloading Packages:
14:51:37 : Checking GPG Signatures:
14:51:37 : Public key for HelixPlayer-1.0.6-1.fc4.2.i386.rpm is not installed


I thought that life would be easier when using yumex but......

Is it required that i need to install public keys for each and every package before me installing anything?
I thought yumex does it for me :confused:

Some one Please help me....
Thanks in advance

pingoomax
23rd May 2006, 05:29 PM
Hi,

You will find how to install gpgKey in the fedorafaq : http://www.fedorafaq.org/#gpgsig
Once a key is installed, you can use THIS repository as you want, but you need to install the key for each repository that you want to use.

Bye.

RichardB
27th May 2006, 12:55 AM
I can't get the proxy to work either.

Jmellor, you say you have to pass the Microsoft domain as well as the Microsoft username and password to the proxy (http://www.spondoo.com) , have you come up with a solution yet?

coppertrail
17th July 2006, 06:41 PM
Ok, found the answer. First have to set the environment variable for yum:

http_proxy=proxy:portnum

Then, export the variable:

export http_proxy

Then run yum as usual. Works fine now.This worked for my situation, but I had to use the following modification as our proxy requires authentication:

http_proxy=http://username:password@myproxyserver.mydomain.com

Thank you for your post, and for the other member who mentioned adding the username and password variables.

nosupport
17th July 2006, 07:12 PM
I'm having the exact opposite problem. I used to use a proxy server, and I forgot how i had it setup. Now I need to find that setting and get rid of it because its driving my crazy having to 'export http_proxy=' every time before i 'yum'. Where I have it set seems to be the ultimate end-all place to set a proxy. If I find it, I will post here. At the moment I'm left to scratch my head and am going to try to find some way to search inside all files on the server for the ip address that '$http_proxy' is evaluating to.

nosupport
17th July 2006, 08:14 PM
/etc/profile:

directly underneath:
HOSTSNAME=`/bin/hostname`
HISTSIZE=1000

I had:
http_proxy=http://oldproxy/
ftp_proxy=http://oldproxy/
socks_proxy=http://oldproxy/

Then I added them to the list a few lines down that starts:
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

This was setting my proxy settings SYSTEM WIDE to that old proxy. Also pls note that you shouldn't assign socks_proxy to an http:// address (I don't see how that would make any sense, I must have just been an idiot then....)

Adesso
14th August 2006, 11:49 AM
Updating the proxy setting in my profile, did not work, in yum.conf.. no way.. and even in the GNOME proxy settings, nothing happened. I tried to update my bashrc, also problimatic. The only solution so far for me was ...


Just copy paste this in your .bashrc and invoke it by the command proxy
This is a secure authentication method:

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password@proxy: port/"
export ftp_proxy="http://$username:$password@proxy: port/"
}

This little bit of code works wonders. Thanks CoolMoHitz

My problem was that my password was ending in a bang (!) and that the parser did not like this, so that it told me !@proxy.com was not working, but with the script in the user .bashrc.. everything is working .. I just love these forums... :D

neilloffhagen
14th August 2006, 12:00 PM
Just to confirm what works for me passing through a proxy. Created an environment file in /etc with the following in:

export ftp_proxy=http://proxy_server_name:80
export http_proxy= http://proxy_server_name:80

and then and this is something that it took me a while to figure out, if I did yum update right away in the same terminal session yum would not work. Needed to close that session and then open a new terminal seesion and it would then work okay.

Neil.

das_deniz
18th September 2006, 04:23 PM
MODERN ANSWER - 2006 - as this shows up in a google search might as well update the resolution for this issue

in yum.conf
add line
proxy=http://<server>:<port>

for more information see http://fedora.redhat.com/docs/yum/sn-yum-proxy-server.html

hazwan07
14th October 2006, 02:31 AM
hello.the suggested solution in documentation didn work for me.it says something about nonnumerical port 8080?.any idea??

das_deniz
14th October 2006, 03:43 AM
you would have to get the port information from your admin (who set up the proxy)
but for us it is port 80 - so give that a shot too....

hazwan07
14th October 2006, 08:48 AM
my port is 8080.i entered it correctly but yum keep on saying error because of nonnumerical port.anyway thanks.any other idea??

das_deniz
15th October 2006, 03:41 AM
so the full line in yum.conf should read something like

proxy=http://myproxyserver.company.com:8080

if you're doing that and you know the name of the server is myproxyserver for your company.com and it's working on 8080 then ... no i don't have any other ideas.... good luck. :)

chad_work2001
3rd November 2006, 10:28 PM
Edit /etc/yum.conf and enter at the bottom of the [main] section:

proxy=http://ipaddress:port

for example

proxy=http://10.1.2.10:3127

This setting is in the man page for yum.conf - man yum.conf.

heringsme
7th November 2006, 01:40 AM
I'd like to make some constructive criticizm.
Please, no one take offense.

Ahem,...

Guys (and/or gals), this is too hard.
Yes, I got it working, but I'm a developer and I work with computers all day. Most people don't...

Most of my friends couldn't have done this and that's bad because...

I'm a Linux evangalist!
I want Linux to take over the world !!! Yeay open software!

That's not going to happen without a lot of work.

There needs to be ONE place to configure proxies.
And ALL applications should have to check (at least) that one place during startup.
Having to configure the browser(s) AND yum.conf AND wgetrc or .bashrc after a lot of Googling the question and reading all these forums...

Yiikes!!!!!

Earlier this week I installed FC6 on a box at home and it hung at the very end and then when I rebooted it went back to Windows (on the first partition). I had to manually install GRUB and of course I had to Google the issue, decide on the best answer, after multiple tries finally found that install (anaconda?) left the drive with Fedora on it out of the devices.map. ??????? !!!!!!!!

Why are the repositories all commented out? Is that a bug or a feature...? That's where I came into this story. I had to Google out why I was getting 'Cannot find a valid baseurl for repo:". And that 'good' error message was from yum. The main package manager just dies with 'can't retrieve software information.' Why not? I have the CDs in the drive... :o(
Package Manager (pirut?) should work if it finds CDs. Sorry, but network installation is optional. Isn't it Sun that thinks "the network is the computer". I installed a minimal configuration and wanted to go back and install more from the CDs. You can't untill you become a Package Manager guru. Or reinstall from scratch to get something you forgot to install the first time.

If it only works if everything is setup just right, where's the robustness? That pretty much qualifies for 'just broken' guys. Sorry but RedHat 9 was miles ahead on that.

Actually, you can't even install Fedora now unless you have a network card installed and plugged into a network, unless you disable all networking during the install and then you can't install the networking packages (or it goes back and tries to force you to install your NIC). What if I want to install a local Apache server and do web development on a stand-alone box. That's legit, I mean it works with Apache and the kernel, yes? And my wireless card can't be seen until I install 'ndiswrapper' (no Linux drivers available) so you have your 'catch-22'.

Some people are doing some very good things and I can see a lot of effort to make the scripts smarter. How about a dialog box "Your application may not work untill you connect to a network. Click here to continue anyway."?

Let's fix Package Manager so it works from CDs OR network.
And Yum (and/or yumex/kyum, etc)...

Probably this is a natural problem with open-source development, where it's hard to impose strict requirements, and maybe that's even a bad thing, but it prevents the normalization of resources, and that can lead to confusion and problems.

I'd like to help...

Thanks for listening.

Greg

kadoo
17th November 2006, 07:05 AM
I have a peculiar problem! In our organization, the proxy username is the FULL email address. For authentication, I tried all the tips and tricks mentioned in this thread, but couldnt get through. I know the reason since beginning...as our proxy username is the full email address, there will be TWO '@' symbols in the follwing format, which probably confuses yum.

format: http_proxy=http://user:passwd@proxy.foo.com:portnumber

The configuration (given below) in fedora webpage http://fedora.redhat.com/docs/yum/sn-yum-proxy-server.html gives me a 'non-numeric' port error.

proxy=http://mycache.mydomain.com:3128
proxy_username=yum-user
proxy_password=qwerty

Interestingly, I could circumvent the problem on my FC4 server using Squid!! I configured Squid (on port 3100) to access the parent (organization's) proxy with username (email address) and password. Then I told yum to use the local (Squid) proxy. This didnt require username and password for yum, as they were handled by the local Squid proxy. Yum worked fine.

I tried to use the same trick on my FC6 laptop. The squid servers on both the FC4 and FC6 boxes correctly serve http/ftp requests from BROWSERS. However, the yum on my FC6 laptop wont work with either of the local proxies. Yum gives following error:

[root@pc1 ~]# yum update
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=core-6&arch=i386 error was
[Errno 14] HTTP Error 503: Server: squid/2.6.STABLE4
Date: Fri, 17 Nov 2006 05:13:48 GMT
Content-Type: text/html
Content-Length: 1182
Expires: Fri, 17 Nov 2006 05:13:48 GMT
X-Squid-Error: ERR_DNS_FAIL 0
X-Cache: MISS from 172.16.23.54
X-Cache-Lookup: MISS from 172.16.23.54:3100
Via: 1.0 172.16.23.54:3100 (squid/2.6.STABLE4)
Proxy-Connection: close

It seems like it's error from Squid. I configured FC6 squid to use the localhost nameserver (by running bind) and/or specified the nameserver in /etc/resolve.conf. But no way. It's surprising that both the FC4/FC6 Squid boxes correctly serve http/ftp requests from browsers but why not from yum on FC6? I made sure that the yum configuration files on both the boxes are same. Also tried Yumex, Kyum, which also refuge to work. Any help in this regard will be highly appriciated. TIA.

Zabby
10th January 2007, 07:51 AM
create the following files in /etc/profile.d, and then this will work in *any* shell for *any* user of the system

#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/

Work Perfectly for me; first time round. Only I redirected this through Your Freedom i.e. localhost:8080

kadoo
10th January 2007, 02:04 PM
In our organization, the proxy username is the FULL email address. ... there will be TWO '@' symbols in the follwing format, which probably confuses yum.

format: http_proxy=http://user:passwd@proxy.foo.com:portnumber



I resolved the problem using percent encoding. As my FULL email address is my username, the above format would expand as below, with two '@'s, so yum would treat abcd.com as password, which would fail.

http_proxy=http://user@abcd.com:userpasswd@proxy.foo.com:portnumber

I encoded the first '@' as '%40', which worked. I specified the http_proxy and ftp_proxy variables in /etc/bashrc and exported them as follows:

http_proxy=http://user%40abcd.com:userpasswd@proxy.foo.com:portnumbe r

Yum works fine. But Yumex doesnt, as it relies on /etc/yum.conf, which does NOT have the proxy information. If proxy is mentioned in /etc/yum.conf, it gives non-numeric port error. And Yumex probably doesnt handle either two '@'s or percent encoding in URL, when declared in it's own configuration.

If someone's proxy username or password contains any special characters, percent encoding might work.


Kadoo

zillah
30th January 2007, 07:56 PM
Please see my thread here :
http://forums.fedoraforum.org/showthread.php?p=734639#post734639

raye
9th March 2007, 09:50 PM
For people behind a windows proxy which uses NTLM authentication this link will help.

http://ntlmaps.sourceforge.net/

The above program should be run as a proxy on your desktop and all your connections should be directed through this.

Did this work for anyone?

itsgarry
1st May 2007, 12:19 PM
Did this work for anyone?

I use ntlmaps at work where they use ISA server in native NTLM mode. It does not support basic authentication, so ntlmaps fixes that problem.

It basically runs on my fedora desktop as a local proxy, and I can point any web application I like to it, for example, yum and a weather applet.

The only drawback is that we are required to change our AD password every month, and that is hard coded in the ntlmaps config file, so I have to change the config file and restart ntlmaps when I change my password.

raye
8th May 2007, 11:37 PM
I use ntlmaps at work where they use ISA server in native NTLM mode. It does not support basic authentication, so ntlmaps fixes that problem.

It basically runs on my fedora desktop as a local proxy, and I can point any web application I like to it, for example, yum and a weather applet.

The only drawback is that we are required to change our AD password every month, and that is hard coded in the ntlmaps config file, so I have to change the config file and restart ntlmaps when I change my password.

How are you running ntlmaps? I have had people tell me it works but they do not specify the exact procedure to get it to work. When should ntlmaps be loaded? How do you "point at any web application" such as yum? Please give detail instructions or information. I have set it up, configured it and run it in a terminal session but yum refuses to work. Please explain. Thanks! Also, is there a particular version of fedora that must be run? 4? 5? 6?

Ray

itsgarry
9th May 2007, 01:39 AM
Hi Ray,

I installed ntlmaps-0.9.9.6-1 from RPM on Fedora Core 6, which install the required binary files in /opt/ntlmaps, and the configuration file in /etc/ntlmaps.

The only file that needs to be changed is /etc/ntlmaps/server.cfg.

The parameters that I changed were PARENT_PROXY, FRIENDLY_IPS, DIRECT_CONNECT_IF_POSSIBLE, NT_DOMAIN, USER and PASSWORD.

The changes that are required are pretty self explanatory, just make sure you put the loopback address in as a FRIENDLY_IPS.

Start the proxy by running /opt/ntlmaps/main.py as root, and it will bind to port 5865 by default. Then point any application that needs internet access to use the proxy at localhost port 5865.

--Garry.

joostieke
10th May 2007, 12:41 PM
This REALLY SOLVES ALL MY PROBLEMS!!!

Also, for the ones getting the numerical error.. try using

proxy="http://server:port/"
proxy_username=username
proxy_password=password

worked for me in FC7

...


I resolved the problem using percent encoding. As my FULL email address is my username, the above format would expand as below, with two '@'s, so yum would treat abcd.com as password, which would fail.

http_proxy=http://user@abcd.com:userpasswd@proxy.foo.com:portnumber

I encoded the first '@' as '%40', which worked. I specified the http_proxy and ftp_proxy variables in /etc/bashrc and exported them as follows:

http_proxy=http://user%40abcd.com:userpasswd@proxy.foo.com:portnumbe r

Yum works fine. But Yumex doesnt, as it relies on /etc/yum.conf, which does NOT have the proxy information. If proxy is mentioned in /etc/yum.conf, it gives non-numeric port error. And Yumex probably doesnt handle either two '@'s or percent encoding in URL, when declared in it's own configuration.

If someone's proxy username or password contains any special characters, percent encoding might work.


Kadoo

sateeshpnv
14th May 2007, 02:16 PM
Thanks for the percent encoding tip. It worked.

jaannawaz
16th May 2007, 11:07 AM
im new user to linux i want to know how to setup networking in linux os

ursu
23rd September 2009, 04:42 PM
create the following files in /etc/profile.d, and then this will work in *any* shell for *any* user of the system


Thanks, mate, works fine on my Fedora 10!

fedix
20th October 2009, 08:31 AM
I've tried many options on this forum but still...

I've got this in my bash profile

export http_proxy=http://ip_address:port
export ftp_proxy=http://ip_address:port

and this in my yum.conf

ftp_proxy=http://username:password@proxy_fqdn:port
http_proxy=http://username:password@proxy_fqdn:port

I've also tried this in my yum conf

proxy=http://proxy_fqdn:port
proxy_username=me
proxy_password=passw


In all these cases I had no luck. I still get these yum error...


http://ftp-stud.hs-esslingen.de/pub/fedora/linux/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
http://ftp.sh.cvut.cz/MIRRORS/fedora/linux/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
http://mirror.aarnet.edu.au/pub/fedora/linux/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
ftp://ftp.quicknet.nl/pub/Linux/download.fedora.redhat.com/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
http://fedora.intergenia.de/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.


Please help!

vtaylorphoto
27th October 2009, 08:09 PM
Neilloffhagen,
Thank you, thank you!! I had the same issue with configuring everything & not opening a new session. It seems to be working now!
Props to you & to Ross Campbell about adding the proxy.sh & proxy.csh files! You guys rock!!

~Val


Just to confirm what works for me passing through a proxy. Created an environment file in /etc with the following in:

export ftp_proxy=http://proxy_server_name:80
export http_proxy= http://proxy_server_name:80

and then and this is something that it took me a while to figure out, if I did yum update right away in the same terminal session yum would not work. Needed to close that session and then open a new terminal seesion and it would then work okay.

Neil.

vtaylorphoto
27th October 2009, 08:13 PM
@fedix,
in your .bash_profile add the "username":"password" information before the proxy server name the same as you have it in your yum.conf file. Then start a new session(window) & try "yum update".

rover_klaus
8th December 2009, 07:29 AM
I tried on constantine, but none of the above methods worked for me. I googled and found that I can simply add a proxy for yum by editing /etc/yum.conf and add this line to it:

proxy=http://host:port

instead of
http_proxy=http://host:port

woelfman10
16th March 2010, 05:33 PM
I tried on constantine, but none of the above methods worked for me. I googled and found that I can simply add a proxy for yum by editing /etc/yum.conf and add this line to it:

proxy=http://host:port

instead of
http_proxy=http://host:port

Thank you rover_klaus. After many failed attempts at getting yum to work through a proxy on newer fedoras (>= 11), I stumbled across your post and it resolved my issue. My google searches yielded the same, seemingly outdated, information of using http_proxy.

itzvasanth
16th June 2010, 06:37 AM
thanks for ""proxy=http://username: password@proxy_fqdn: port""

Worked like a charm in fed 13.. :)

HTPSNJ
18th September 2010, 12:21 PM
a good fast and efficient web proxy (http://www.punchrocket.com) module is at punch rocket proxy

kkshethin
20th October 2010, 01:32 PM
Thanks to all of you, specially rover_claus.

My office has proxy 192.168.0.1 and port 8080

i followed following steps

sudo gedit /etc/yum.conf

Add this line at the end

proxy=http://192.168.0.1:8080

save and exit.

now

sudo yum update.

hoooooooooorrrrrrrrrrrahhh

ImNtReal
8th November 2010, 05:26 PM
I've googled, and googled, but have yet to find a solution to my yum proxy problem. I have a ssh tunnel setup to bypass our proxy server because we use web washer, and that causes other problems of its own. Anyway, I am able to use yum through proxychains (e.g. proxychains yum update). However, yum by itself will not work.

proxychains.conf:
strict_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000

[ProxyList]
socks5 127.0.0.1 9999

yum.conf (when not using proxychains):
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
opsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
color=never

proxy=http://127.0.0.1:9999


Does anyone have a clue what I'm doing wrong?

Thanks,
=-Jameson

---------- Post added at 11:26 AM GMT ---------- Previous post was at 11:24 AM GMT ----------

Almost forgot, it gives me:
[Errno 14] PYCURL ERROR 52

niravshahecom
26th April 2011, 09:51 PM
I have username and pass word for my squid proxy

so i add this at bottom of /etc/yum.conf
proxy=http://username:your_password@proxy_ip:your_proxy_port


ya , it worked

Diar
18th September 2011, 02:14 PM
Add proxy=http://name:port to /etc/yum.conf

trvlrs
1st December 2011, 05:07 PM
After reading most of these posts I did not see this answer anywhere which to me seems quit simple. But I am just a beginer.

# The proxy server - proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty

---------- Post added at 10:07 AM ---------- Previous post was at 10:04 AM ----------

I did not put that face in my post, something happened after I hit submit, my appologies.

Toniio
16th December 2011, 01:54 PM
Thanks niravshahecom

ogj
28th February 2012, 10:48 AM
Sorry. Some may call this issue resolved, but I am not very happy with this solution. Firstly, what about the (not uncommon) case where one needs to use a proxy at work, but no proxy at home (and a laptop that is used both places). Now with Fedora 16 this is pretty easily configured in network preferences. But this configuration is not used by yum. How come? And, we have a automatic proxy configuration through a proxy.pac, where the actual proxy may change quite often (some kind of load balancing, I guess). I know it is still solvable by inspecting the proxy.pac file, and extracting the actual proxy address. But then it is too difficult for most users. I would like yum to use the same configuration as the browser. It works fine in chromium.