Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm not sure how to set up authenticated proxy access with rpm. But I have it set up with wget and yum.

When I run rpm -Uvh http://dl.fedoraproject.org/etc...

It just says 'Retrieving http://...' and I have no idea what's going on.

Any help?

share|improve this question
1  
I think the simple answer is you CAN'T. You have to download the repo from wget / yum and then rpm -Uvh the repo without http'ing. – AlxVallejo Mar 30 '12 at 21:42

2 Answers

You can use the usual way of exporting the http_proxy (and/or https_proxy) variable. I believe this will also work with "wget". RPM seems to use "curl" to get the files, so "man curl" may be also useful.

$ rpm -qp http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/os/i386/Packages/centos-release-6-2.el6.centos.7.i686.rpm
curl: (7) Failed to connect to 2001:200:141:feed::feed: Network is unreachable
error: http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/os/i386/Packages/centos-release-6-2.el6.centos.7.i686.rpm: open failed: No such file or directory

$ export http_proxy="http://${proxy_user}:${proxy_pass}@${proxy_server}:${proxy_port}/"
$ rpm -qp http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/os/i386/Packages/centos-release-6-2.el6.centos.7.i686.rpm
centos-release-6-2.el6.centos.7.i686
share|improve this answer

For RPM, what you provide to --httpproxy will be forwarded to curl --proxy.

So rpm --httpproxy http://foo:bar@proxy.example.com:3128.

If you want to troubleshoot, you can edit /usr/lib/rpm/macros and remove --silent in there:

%__urlhelpercmd         /usr/bin/curl
%__urlhelperopts        --silent --show-error --fail --location -o
%__urlhelper_proxyopts   %{?_httpproxy:--proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.