problem with stack behind proxy

63 visualizzazioni
Passa al primo messaggio da leggere

Nikos Karagiannidis

da leggere,
20 mar 2018, 13:00:2920/03/18
a haskel...@googlegroups.com
Hi all,

I am trying to run stack build, or stack update behind the corporate web proxy and I get the following error:

$ stack build
Downloading lts-11.1 build plan ...HttpExceptionRequest Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-11.1.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 (ProxyConnectException "raw.githubusercontent.com" 443 (Status {statusCode = 407, statusMessage = "Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )"}))

My stack version is:

$ stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 x86_64 hpack-0.15.0

I have set the HTTP_PROXY and HTTPS_PROXY environment variables to a value of:
HTTP_PROXY = http://proxy-host:8080
HTTPS_PROXY = http://proxy-host:8080

Can you help me how to achieve proxy authentication via stack?

thank you in advance!

Nikos

Neil Mitchell

da leggere,
21 mar 2018, 02:37:2921/03/18
a Nikos Karagiannidis, haskell-stack
Hi Nikos,

Do you have a username/password? Sometimes
http://username:password@proxy-host:8080 will work.

If you can't get HTTP_PROXY working at all, see
https://github.com/ndmitchell/offline-stack, which is a more violent
and unpleasant workaround for corporate networks.

Thanks, Neil
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-stack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-stac...@googlegroups.com.
> To post to this group, send email to haskel...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haskell-stack/CAN0STeQPzM2SyxyYUiy3o2HS%2BDMw8sWmTcyWZHi-LwLANjY%2BtQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Yuji Yamamoto

da leggere,
21 mar 2018, 02:37:3021/03/18
a Nikos Karagiannidis, haskel...@googlegroups.com
According to the error, you must set proxy user name and password to pass the authentication.

Like this:

HTTPS_PROXY = http://username:password@ proxy-host:8080  

Note that you must URI-encode the username or password if they include some meta-characters like a colon or an at-sign.

Besides,  stack 1.3.2 is too old!

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stack+unsubscribe@googlegroups.com.

Nikos Karagiannidis

da leggere,
21 mar 2018, 05:46:0221/03/18
a Yuji Yamamoto, ndmit...@gmail.com, haskel...@googlegroups.com
Thank you both for your help!

I have tried to embed a URI encoded username and password in the HTTP_PROXY setting but still did not work.
I have managed to find an alternative proxy by talking to the network department that does not require authentication!
So now "stack upgrade" works for me too!

I will continue with this workaround for now ...

many thanks!
Nikos

Yuji Yamamoto

da leggere,
21 mar 2018, 05:51:2021/03/18
a Nikos Karagiannidis, ndmit...@gmail.com, haskel...@googlegroups.com, Haskell Cafe
FYI.

If your office's proxy server is authenticated with NTLM authentication,
use CNTLM http://cntlm.sourceforge.net/ , a proxy of proxy for NTLM-authenticated server.
Actually, my last office uses it :)
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi