Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using commercialhaskell/stack with a proxy

I'm trying to use stack behind a corporate proxy. Issuing the stack new command returns:

InvalidProxyEnvironmentVariable "http_proxy" "http://username:password@host:port/"

I have http_proxy, https_proxy and ftp_proxy defined in my .bashrc, as well as their equivalents in all caps (e.g. HTTP_PROXY). Removing or altering those will break stuff elsewhere.

The stack repo doesn't seem to have proxy behaviour documented yet, which is understandable since it was only recently released. Does anyone know if using stack behind a proxy is even possible at the moment? If so, how?

like image 652
cms_mgr Avatar asked Jun 30 '15 10:06

cms_mgr


1 Answers

This is a limitation of http-client, which has now been reported and resolved. This change will get released to Hackage in the next few days, and then hopefully the next official build of stack will include the change. If you're adventurous, you can build the http-proxy-auth branch, which includes this fix pre-release.

like image 141
Michael Snoyman Avatar answered Nov 13 '22 19:11

Michael Snoyman