Closed
Description
I am using trying to use Cargo from behind a proxy, and it is unable to fetch external repositories despite having all the appropriate environment variables and configurations.
More specifically, I have the following environment variables set:
export HTTP_PROXY=proxy.example.com:8000
export HTTPS_PROXY=proxy.example.com:8000
export FTP_PROXY=proxy.example.com:8000
along with their lowercase counterparts. Git and Cargo both have in their configuration:
[http]
proxy = proxy.example.com:8000
[https]
proxy = proxy.example.com:8000
and git
from the command line works fine; however, when Cargo attempts to fetch a repository, I encounter
$ cargo build
Updating git repository `https://github.com/pistondevelopers/piston`
Unable to update https://github.com/pistondevelopers/piston
Caused by:
failed to fetch into /home/user/.cargo/git/db/piston-10111ca7958cf505
Caused by:
[2] Failed to connect to github.com: No route to host
yet if I run git on its own, it works fine:
$ git clone https://github.com/pistondevelopers/piston
Cloning into 'piston'...
remote: Counting objects: 1959, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 1959 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1959/1959), 2.19 MiB | 575 KiB/s, done.
Resolving deltas: 100% (1252/1252), done.