Machine setup: Windows 7 Ultimate. ru-ru locale.
Steps to reproduce: work behind corporate proxy. Run "vcpkg.exe install boost" and everything is fine (because of http links). Run "vcpkg.exe install tinyxml2" and get an error.
Looks like https proxy is handled the same way, as http one, which isn't correct.
Here's a screenshot:
Have you tried setting the HTTP_PROXY and HTTPS_PROXY environment variables? Note that they're different.
http://cmake.3232098.n2.nabble.com/ExternalProject-Add-and-proxy-td7591815.html
Related: #252
I have both HTTP_PROXY and HTTPS_PROXY enviroment variables. According to the links that I've provided it seems like a deal with a cmake. Probably the easiest way would be to install proper cmake or to modify the portable one.
I had the same problem and was not able to download any files and install them. It was complaining about HTTP_PROXY and HTTPS_PROXY although they are set as system environment variables. This resolved my problem:
Find this file:
vcpkg/scripts/cmake/vcpkg_download_distfile.cmake
Change the lines 107-120 as
if(${_VCPKG_DOWNLOAD_TOOL} MATCHES "ARIA2" AND NOT ${SAMPLE_URL} MATCHES "aria2")
vcpkg_find_acquire_program("ARIA2")
message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...")
execute_process(
COMMAND ${ARIA2} ${vcpkg_download_distfile_URLS}
-o temp/${vcpkg_download_distfile_FILENAME}
-l download-${vcpkg_download_distfile_FILENAME}-detailed.log
-https-proxy=https://host:port/
-http-proxy=http://host:port/
OUTPUT_FILE download-${vcpkg_download_distfile_FILENAME}-out.log
ERROR_FILE download-${vcpkg_download_distfile_FILENAME}-err.log
RESULT_VARIABLE error_code
WORKING_DIRECTORY ${DOWNLOADS}
)
Don't forget to change host:port and adding "/" at the end is crucial. With this change, I can install any package I want without any issues.
This is kind of a floating error which is getting fixed and broken again every now and then.
I wish developers could add a typical corporate squid-proxy situation to their CI test suite.
I've had success with HTTP_PROXY and HTTPS_PROXY environment variables in the past, but it wasn't working now. I have the correct proxy settings set in Windows "Internet Options". I was able to enable use of those proxy settings with this command: netsh.exe winhttp import proxy source=ie
Running netsh winhttp set proxy 1.2.3.4:8080 did the trick for me behind a corporate proxy.
finally resolved the annoying problem by setting env var to socks5 proxy, like
HTTP_PROXY
socks5://127.0.0.1:65535/
HTTPS_PROXY
socks5://127.0.0.1:65535/
finally resolved the annoying problem by setting env var to socks5 proxy, like
HTTP_PROXY
socks5://127.0.0.1:65535/HTTPS_PROXY
socks5://127.0.0.1:65535/
It works. Thank you~
It looks this issue could be closed now.
I am having this issue in vcpkg 2020.06.15
I have HTTPS_PROXY and HTTP_PROXY set to the correct values. Nondescript error message.
-- Downloading https://github.com/boostorg/compatibility/archive/boost-1.73.0.tar.gz... Failed. Status: 4;"A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision."
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:178 (message):
Failed to download file.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "https://user:password@your-proxy-ip-address:port/".
Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
Call Stack (most recent call first):
scripts/cmake/vcpkg_from_github.cmake:132 (vcpkg_download_distfile)
ports/boost-compatibility/portfile.cmake:3 (vcpkg_from_github)
scripts/ports.cmake:79 (include)
Most helpful comment
finally resolved the annoying problem by setting env var to socks5 proxy, like
HTTP_PROXY
socks5://127.0.0.1:65535/
HTTPS_PROXY
socks5://127.0.0.1:65535/