# Trouble using "zypper addrepo" with http proxy and certs

**URL:** <https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604>\
**Category:** SLES Networking\
**Created:** [June 25, 2018, 10:18pm UTC](https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604 "2018-06-25T22:18:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tllmco](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@tllmco](https://forums.suse.com/u/tllmco)\
**Post date:** [June 25, 2018, 10:18pm UTC](https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604/1 "2018-06-25T22:18:01Z")

</div>

I am trying to setup a SLES 11 SP4 VM in Virtualbox to use a specific http proxy for all traffic along with certs exported from Windows.

I have successfully added the proxy and certs to Firefox so that Firefox works without problems. I also have the http\_proxy and https\_proxy environment variables set to the proxy URL.

Now I am trying to get zypper to work. My specific test case is to try and add the repository needed to install git. I will include the output below. I also tried to retry without the SSL verification but the result was the same error as before.

[CODE]$ sudo zypper addrepo [https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)

Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
Error code: Connection failed  
Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable

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

a - Skip retrieval of the file and abort current operation.  
r - Try to retrieve the file again.  
i - Skip retrieval of the file and try to continue with the operation without the file.  
u - Change current base URI and try retrieving the file again.

[a/r/i/? shows all options] (a): a  
Problem accessing the file at the specified URI:  
Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
Error code: Connection failed  
Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable

Please check if the URI is valid and accessible.  
$ sudo zypper addrepo [https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)  
Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
Error code: Connection failed  
Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable

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

a - Skip retrieval of the file and abort current operation.  
r - Try to retrieve the file again.  
i - Skip retrieval of the file and try to continue with the operation without the file.  
u - Change current base URI and try retrieving the file again.  
s - Disable SSL certificate authority check and continue.

[a/r/i/? shows all options] (a): s  
SSL certificate authority check disabled.  
Abort, retry, ignore? [a/r/i/? shows all options] (a): r  
Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
Error code: Connection failed  
Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable

Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
Problem accessing the file at the specified URI:  
Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
Error code: Connection failed  
Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable

Please check if the URI is valid and accessible.[/CODE]

Interestingly I could use curl to download the content of the address, but only if I passed the --insecure flag.

[CODE]$ curl --insecure [https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)

301 Moved Permanently
# Moved Permanently

The document has moved [here](https://download.opensuse.org/repositories/devel:tools:/scm/SLE_11_SP4/devel:tools:scm.repo).

* * *
Apache/2.4.23 (Linux/SUSE) Server at download.opensuse.org Port 443 [/CODE]

Any ideas how I can approach solving this?

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [June 26, 2018, 1:55am UTC](https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604/2 "2018-06-26T01:55:11Z")

</div>

tllmco Wrote in message:  
[color=blue]

> I am trying to setup a SLES 11 SP4 VM in Virtualbox to use a specific  
> http proxy for all traffic along with certs exported from Windows.
> 
> I have successfully added the proxy and certs to Firefox so that Firefox  
> works without problems. I also have the http\_proxy and https\_proxy  
> environment variables set to the proxy URL.
> 
> Now I am trying to get zypper to work. My specific test case is to try  
> and add the repository needed to install git. I will include the output  
> below. I also tried to retry without the SSL verification but the result  
> was the same error as before.
> 
> ## Code:
> 
> ```
> $ sudo zypper addrepo [url]https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo[/url]
> 
> ```
> 
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): ?
> 
> a - Skip retrieval of the file and abort current operation.  
> r - Try to retrieve the file again.  
> i - Skip retrieval of the file and try to continue with the operation without the file.  
> u - Change current base URI and try retrieving the file again.
> 
> [a/r/i/? shows all options] (a): a  
> Problem accessing the file at the specified URI:  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Please check if the URI is valid and accessible.  
> $ sudo zypper addrepo [https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): ?
> 
> a - Skip retrieval of the file and abort current operation.  
> r - Try to retrieve the file again.  
> i - Skip retrieval of the file and try to continue with the operation without the file.  
> u - Change current base URI and try retrieving the file again.  
> s - Disable SSL certificate authority check and continue.
> 
> [a/r/i/? shows all options] (a): s  
> SSL certificate authority check disabled.  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): r  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Problem accessing the file at the specified URI:  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> ## Please check if the URI is valid and accessible.
> 
> Interestingly I could use curl to download the content of the address,  
> but only if I passed the --insecure flag.
> 
> ## Code:
> 
> ```
> $ curl --insecure [url]https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo[/url]
> 
> ```
> 
> 301 Moved Permanently 
> # Moved Permanently
> 
> The document has moved [here](https://download.opensuse.org/repositories/devel:tools:/scm/SLE_11_SP4/devel:tools:scm.repo).
> 
> * * *
> Apache/2.4.23 (Linux/SUSE) Server at download.opensuse.org Port 443 --------------------
> 
> Any ideas how I can approach solving this?[/color]

Is the IPv6 address above your proxy as set for http\_proxy and  
https\_proxy? To be honest I’ve never tried setting an IPv6  
address only IPv4.

Have you seen TID 7006845[1], particularly the reference to  
/etc/sysconfig/proxy ?

HTH.

## [1] [https://www.novell.com/support/kb/doc.php?id=7006845](https://www.novell.com/support/kb/doc.php?id=7006845)

Simon Flood  
SUSE Knowledge Partner

----Android NewsGroup Reader----  
[http://usenet.sinaapp.com/](http://usenet.sinaapp.com/)

---

<div class="post-metadata">

**Author:** ![tllmco](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@tllmco](https://forums.suse.com/u/tllmco)\
**Post date:** [June 26, 2018, 7:21pm UTC](https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604/3 "2018-06-26T19:21:58Z")

</div>

tllmco Wrote in message:  
[color=blue]

> I am trying to setup a SLES 11 SP4 VM in Virtualbox to use a specific  
> http proxy for all traffic along with certs exported from Windows.
> 
> I have successfully added the proxy and certs to Firefox so that Firefox  
> works without problems. I also have the http\_proxy and https\_proxy  
> environment variables set to the proxy URL.
> 
> Now I am trying to get zypper to work. My specific test case is to try  
> and add the repository needed to install git. I will include the output  
> below. I also tried to retry without the SSL verification but the result  
> was the same error as before.
> 
> ## Code:
> 
> ```
> $ sudo zypper addrepo [url]https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo[/url]
> 
> ```
> 
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): ?
> 
> a - Skip retrieval of the file and abort current operation.  
> r - Try to retrieve the file again.  
> i - Skip retrieval of the file and try to continue with the operation without the file.  
> u - Change current base URI and try retrieving the file again.
> 
> [a/r/i/? shows all options] (a): a  
> Problem accessing the file at the specified URI:  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Please check if the URI is valid and accessible.  
> $ sudo zypper addrepo [https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): ?
> 
> a - Skip retrieval of the file and abort current operation.  
> r - Try to retrieve the file again.  
> i - Skip retrieval of the file and try to continue with the operation without the file.  
> u - Change current base URI and try retrieving the file again.  
> s - Disable SSL certificate authority check and continue.
> 
> [a/r/i/? shows all options] (a): s  
> SSL certificate authority check disabled.  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): r  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Abort, retry, ignore? [a/r/i/? shows all options] (a): a  
> Problem accessing the file at the specified URI:  
> Download (curl) error for ‘[https://download.opensuse.org/repositories/devel:tools:scm/SLE\_11\_SP4/devel:tools:scm.repo?ssl\_verify=no](https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo?ssl_verify=no)’:  
> Error code: Connection failed  
> Error message: Failed to connect to 2620:113:80c0:8::13: Network is unreachable
> 
> ## Please check if the URI is valid and accessible.
> 
> Interestingly I could use curl to download the content of the address,  
> but only if I passed the --insecure flag.
> 
> ## Code:
> 
> ```
> $ curl --insecure [url]https://download.opensuse.org/repositories/devel:tools:scm/SLE_11_SP4/devel:tools:scm.repo[/url]
> 
> ```
> 
> 301 Moved Permanently 
> # Moved Permanently
> 
> The document has moved [here](https://download.opensuse.org/repositories/devel:tools:/scm/SLE_11_SP4/devel:tools:scm.repo).
> 
> * * *
> Apache/2.4.23 (Linux/SUSE) Server at download.opensuse.org Port 443 --------------------
> 
> Any ideas how I can approach solving this?[/color]

[QUOTE]Is the IPv6 address above your proxy as set for http\_proxy and  
https\_proxy? To be honest I’ve never tried setting an IPv6  
address only IPv4.[/QUOTE]

The IPv6 address is my proxy. I assumed it was the repository’s address.

[QUOTE]Have you seen TID 7006845[1], particularly the reference to  
/etc/sysconfig/proxy ?[/QUOTE]

Thanks for the resource. I haven’t seen it. I edited /etc/sysconfig/proxy and set both the HTTP and HTTPS variables to point to my HTTP proxy, logged out and back in and now zypper works (albeit with disabling SSL Verification)!

---

<div class="post-metadata">

**Author:** ![enovaklbank](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@enovaklbank](https://forums.suse.com/u/enovaklbank)\
**Post date:** [November 26, 2018, 5:44pm UTC](https://forums.suse.com/t/trouble-using-zypper-addrepo-with-http-proxy-and-certs/32604/4 "2018-11-26T17:44:48Z")

</div>

If your proxy terminates SSL, you need the proxy’s certificate as a trusted CA.  
In order to have this, copy the PEM encoded certificate to /etc/ssl/certs and do a

```auto
c_rehash /etc/ssl/certs
```

on SLES11. On SLES12 you’d need to use the /etc/pki/trust/anchors directory and call

```auto
update-ca-certificates
```

See the `rpm -q --scripts openssl-certs` (SLES11) or `rpm -q --scripts ca-certificates` (SLES12) output if in doubt.
