Newer Version Available

This content describes an older version of this product. View Latest

Use the Salesforce CLI from Behind a Company Firewall or Web Proxy

If you install or update the Salesforce CLI on a computer that’s behind a company firewall or web proxy, you might receive error messages. In this case, you must further configure your system.

You get an error similar to the following when you run a command after installing the CLI binary behind a firewall or web proxy. This error is from a Linux computer, but Windows and macOS users sometimes see similar errors.

1panic: Get https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/darwin-x64: EOF
2 
3goroutine 1 [running]:
4panic(0x265c00, 0xc4200f0060)
5/usr/local/go/src/runtime/panic.go:500 +0x1a1
6main.must(0x3c0280, 0xc4200f0060)
7/home/ubuntu/.go_workspace/src/github.com/heroku/cli/io.go:115 +0x5c
8main.GetUpdateManifest(0x2a734b, 0x6, 0x2a6b5c, 0x3, 0x3c0280)
9/home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:104 +0x26b
10main.GetUpdateManifest(0x2a734b, 0x6, 0x2a6b5c, 0x3, 0x0)
11/home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:102 +0x2ed
12main.Install()
13/home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:33 +0xf9
14main.main()
15/home/ubuntu/.go_workspace/src/github.com/heroku/cli/main.go:18 +0x3

Updating the CLI behind a firewall or web proxy might return these errors.

1sfdx-cli: Updating CLI... !
2 ▸  'ECONNRESET': tunneling socket could not be established, cause=connect EHOSTUNREACH 0.0.23.221:8080 - Local (10.126.148.39:53107)

To address this issue, run these commands from your terminal or Windows command prompt, replacing username:pwd with your web proxy username and password. If your proxy doesn’t require these values, omit them. Also replace proxy.company.com:8080 with the URL and port of your company proxy.

1npm config set https-proxy https://username:pwd@proxy.company.com:8080
2npm config set proxy https://username:pwd@proxy.company.com:8080
3npm config set sslVerify false
4npm config set strict-ssl false

Then set the HTTP_PROXY or HTTPS_PROXY environment variable to the full URL of the proxy. For example, on UNIX:

1export HTTP_PROXY=http://username:pwd@proxy.company.com:8080
1export HTTPS_PROXY=https://username:pwd@proxy.company.com:8080
On a Windows machine:
1set HTTP_PROXY=http://username:pwd@proxy.company.com:8080
1set HTTPS_PROXY=https://username:pwd@proxy.company.com:8080