2

I'm having trouble getting snap to use a proxy with authentication. I've tried configuring the snapd.service to setup the environment (http_proxy/https_proxy) and also used /etc/environment to do the same, as was suggested in these threads:

How to install snap packages behind web proxy on Ubuntu 16.04

https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1579652

http://paste.ubuntu.com/p/K8VncJv4vp/

It connects to the proxy but does not use the credentials specified in the URL

http://username:password@proxyURL:port

Has anyone gotten around this?

2 Answers 2

3

I've been stuck in the same situation but I've solved it.

  1. Set your proxy in /etc/envirnment (or export http_porxy="http://username:password@proxyURL:port")
  2. Check it with bash echo $http_proxy
  3. sudo snap set system proxy.http=$http_proxy
  4. sudo snap set system proxy.https=$http_proxy

With that configuration I could pass the proxy with authentification.

-1

Snap service is configured to use special environment file, so you can just add http_proxy variable to it if your current environment variables are not picked up by the snap.

Open file:

sudo vim /etc/sysconfig/snapd

Add:

http_proxy=http://127.0.0.1:3128
https_proxy=http://127.0.0.1:3128

https://askubuntu.com/a/1110040/757551

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .