5

My Pi is behind a proxy. I am able to download packages using apt-get command.

However, when I use something like this:

curl https://www.dataplicity.com/iam1o1sx.py | sudo python

There is an error:

Could not resolve host: www.dataplicity.com

I have entered my credentials (user name:password @ proxy) for HTTP, HTTPS and FTP in 10proxy file.

What could the problem be?

techraf
  • 4,353
  • 10
  • 32
  • 43
Abhilash A
  • 71
  • 1
  • 1
  • 3

1 Answers1

7

curl has no idea about 10proxy file, which is exclusive to apt package manager.

You should either specify your proxy in http_proxy environment variable, or using --proxy command line switch.

PS. HTTP error 407 means: "Proxy authentication required". Obviously, you forgot to specify your username and password, like this:

export https_proxy=user:password@server:port

Incidentally, if you happen to have special characters like : or @ in your password, you might be interested to know how to encode them.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147