How to use openSUSE zypper behind a proxy (with authentication)

Written by - 3 comments

Published on November 10th 2014 - Listed in Linux Network Internet

Was trying to figure out, how to use "zypper" behind a http proxy which requires authentication. Because direct Internet access was cut, an installation through zypper would fail with this message:

geeko:~ # zypper se vnc
Download (curl) error for '':
Error code: Connection failed

Turns out it's actually pretty easy - once you know how to do it.
In openSUSE there is a global proxy configuration file /etc/syconfig/proxy which can be edited to your needs. For example:


This works fine if you don't require authentication to go through the proxy. But if you need authentication, zypper will still fail:

geeko:~ # zypper se vnc
Download (curl) error for '':
Error code: HTTP response: 407
Error message: The requested URL returned error: 407 Proxy Authorization Required

Abort, retry, ignore? [a/r/i/? shows all options] (a): a

For authentication, the same file (/etc/sysconfig/proxy) is also used. The user and password can be entered into the HTTP_PROXY definition:


And voilĂ , zypper can now be launched right away (without having to re-login):

geeko:~ # zypper se vnc
Loading repository data...
Reading installed packages...

Additionally to this, there is also a helpful proxy exception definition which can be configured in /etc/syconfig/proxy:


This also applies to SLES (SuSE Linux Enterprise Server) and SLED (SuSE Linux Enterprise Desktop), see

Add a comment

Show form to leave a comment

Comments (newest first)

ck from Switzerland wrote on Oct 11th, 2017:

Roshny, you obviously also need to check your firewall rules if this host is even allowed to connect to the Internet or to a HTTP Proxy.

Roshny from India wrote on Oct 11th, 2017:

I have done all this but still I cannot connect to the internet through the terminal. I cannot install softwares through YAST either. Please Help

Gordon Franke from wrote on Jul 12th, 2017:

typo "/etc/syconfig/proxy" missing "s" change to /etc/sysconfig/proxy