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

Written by - 5 comments

Published on - last updated on January 17th 2022 - 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 KB 7006845.

Add a comment

Show form to leave a comment

Comments (newest first)

Claudio from Switzerland wrote on Jun 14th, 2019:

Alex, which SUSE and zypper version are you using? The post is from 2014 so it is possible a lot has changed since.

Alex from wrote on Jun 14th, 2019:

Greetings... i've done those configurations as demonstrated but i'm still unable to update my system through the proxy using zypper....

getting errorcode "curl error 52"

any ideas?

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