我在 (Windows) 代理后面使用 Ubuntu。我想使用该cabal
实用程序。
jem@Respect:~$ cabal update
Config file path source is default config file.
Config file /home/jem/.cabal/config not found.
Writing default configuration to /home/jem/.cabal/config
Downloading the latest package list from hackage.haskell.org
Warning: invalid http proxy uri:
"http://domain\\user:pass@internetproxy:3128/"
Warning: proxy uri must be http with a hostname
Warning: ignoring http proxy, trying a direct connection
^C
Run Code Online (Sandbox Code Playgroud)
已从环境中读取代理 URL。我的代理需要身份验证,但 cabal 希望代理 URL 以主机名开头,因此它可能会提示我输入凭据...
jem@Respect:~$ http_proxy=http://internetproxy:3128/ cabal update
Downloading the latest package list from hackage.haskell.org
No action for prompting/generating user+password credentials provided (use: setAuthorityGen); returning Nothing
cabal: Failed to download index 'ErrorMisc "Unsucessful HTTP code: (4,0,7)"'
Run Code Online (Sandbox Code Playgroud)
什么是setAuthorityGen
以及如何使用它?更重要的是,我可以通过身份验证代理启用访问吗?我需要隧道吗?