Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Snap Proxy doesn´t work

I try to install Conjure-Up on my Ubuntu 18.04 virtual machine with

$sudo snap install conjure-up --classic

But it always says:

error: cannot install "conjure-up": Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: EOF

I have successfully set up my http and https proxy in /etc/environments

need help.

like image 935
Kai Avatar asked May 29 '18 12:05

Kai


2 Answers

It will help.

Example

sudo snap set system proxy.http=http://127.0.0.1:3128
sudo snap set system proxy.https=http://127.0.0.1:3128
like image 161
sn41 Avatar answered Sep 16 '22 22:09

sn41


Looks like snapd doesn't apply the /etc/environment proxy settings as of 18.04. You can apply an override to snapd service to get around this though.

sudo systemctl edit snapd.service

Add in the following:

[Service]
Environment=http_proxy=http://proxy:port
Environment=https_proxy=http://proxy:port

Save then reload:

sudo systemctl daemon-reload
sudo systemctl restart snapd.service

Snap installs should now go through specified proxy.

like image 37
Steven Edwards Avatar answered Sep 17 '22 22:09

Steven Edwards