Alan McKay | 31 Jan 16:02 2012
Picon

yum-enabled RHEL5 through proxy?

Hey folks,

Corporate sprung an enforced proxy on us yesterday without prior notice and now I'm scrambling with my RHEL5 boxes.

Google found me this nifty little bash function which I put in bashrc, and it seems to work for the EPEL repo but not the base RHEL ones

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password <at> servername:8080"
export ftp_proxy="http://$username:$password <at> servername:8080"
}

I just type "proxy" and it prompts for my UN/PW, and then I run "yum" and it works with EPEL.   Just not the base repos.

Here is what I get :

[root <at> solexa6 rpms]# yum -y install e4fsprogs
Loaded plugins: downloadonly, product-id, rhnplugin, security, subscription-manager
Updating Red Hat repositories.
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:
Connection refused
file://var/cache/yum/rhel-x86_64-server-5/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/rhel-x86_64-server-5/repodata/repomd.xml'
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package e4fsprogs.x86_64 0:1.41.12-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================
 Package                           Arch                           Version                               Repository                                    Size
===========================================================================================================================================================
Installing:
 e4fsprogs                         x86_64                         1.41.12-2.el5                         rhel-x86_64-server-5                         1.1 M

Transaction Summary
===========================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.1 M
Downloading Packages:


Error Downloading Packages:
  e4fsprogs-1.41.12-2.el5.x86_64: failure: getPackage/e4fsprogs-1.41.12-2.el5.x86_64.rpm from rhel-x86_64-server-5: [Errno 256] No more mirrors to try.



--
“Don't eat anything you've ever seen advertised on TV”
         - Michael Pollan, author of "In Defense of Food"

_______________________________________________
rhelv5-list mailing list
rhelv5-list@...
https://www.redhat.com/mailman/listinfo/rhelv5-list
Brandon Perkins | 31 Jan 18:24 2012
Picon

Re: yum-enabled RHEL5 through proxy?


This Knowledgebase article should give you the information you need:

https://access.redhat.com/kb/docs/DOC-9826

Thanks,
Brandon

On 01/31/12 10:02, Alan McKay wrote:
> Hey folks,
> 
> Corporate sprung an enforced proxy on us yesterday without prior
> notice and now I'm scrambling with my RHEL5 boxes.
> 
> Google found me this nifty little bash function which I put in
> bashrc, and it seems to work for the EPEL repo but not the base
> RHEL ones
> 
> function proxy(){ echo -n "username:" read -e username echo -n
> "password:" read -es password export
> http_proxy="http://$username:$password <at> servername:8080" export
> ftp_proxy="http://$username:$password <at> servername:8080" }
> 
> I just type "proxy" and it prompts for my UN/PW, and then I run
> "yum" and it works with EPEL.   Just not the base repos.
> 
> Here is what I get :
> 
> [root <at> solexa6 rpms]# yum -y install e4fsprogs Loaded plugins:
> downloadonly, product-id, rhnplugin, security, 
> subscription-manager Updating Red Hat repositories. There was an
> error communicating with RHN. RHN Satellite or RHN Classic support
> will be disabled. Error communicating with server. The message
> was: Connection refused 
> file://var/cache/yum/rhel-x86_64-server-5/repodata/repomd.xml:
> [Errno 5] OSError: [Errno 2] No such file or directory: 
> '/cache/yum/rhel-x86_64-server-5/repodata/repomd.xml' Trying other
> mirror. Setting up Install Process Resolving Dependencies -->
> Running transaction check ---> Package e4fsprogs.x86_64
> 0:1.41.12-2.el5 set to be updated --> Finished Dependency
> Resolution
> 
> Dependencies Resolved
> 
> ===========================================================================================================================================================
>
> 
Package                           Arch                           Version
> Repository Size 
> ===========================================================================================================================================================
>
> 
Installing:
> e4fsprogs                         x86_64 1.41.12-2.el5
> rhel-x86_64-server-5 1.1 M
> 
> Transaction Summary 
> ===========================================================================================================================================================
>
> 
Install       1 Package(s)
> Upgrade       0 Package(s)
> 
> Total download size: 1.1 M Downloading Packages:
> 
> 
> Error Downloading Packages: e4fsprogs-1.41.12-2.el5.x86_64:
> failure: getPackage/e4fsprogs-1.41.12-2.el5.x86_64.rpm from
> rhel-x86_64-server-5: [Errno 256] No more mirrors to try.
> 
> 
> 
> 
> 
> 
> _______________________________________________ rhelv5-list mailing
> list rhelv5-list@... 
> https://www.redhat.com/mailman/listinfo/rhelv5-list
Fran Garcia | 1 Feb 11:20 2012
Picon

Re: yum-enabled RHEL5 through proxy?

On Tue, Jan 31, 2012 at 15:02, Alan McKay <alan.mckay@...> wrote:
> Hey folks,
>
> Corporate sprung an enforced proxy on us yesterday without prior notice and
> now I'm scrambling with my RHEL5 boxes.
>

you probably need to also set the "https_proxy" variable up as well :-)

HTH

Gmane