Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Ubuntu behind a (Windows) proxy. I would like to use the cabal utility.

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

The proxy URL has been read from the environment. My proxy requires authentication, but cabal wants the proxy URL to start with a hostname, so perhaps it will prompt me for credentials...

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)"'

What is setAuthorityGen and how do I use it? More importantly, can I enable access via the authenticating proxy? Will I need to tunnel?

share|improve this question
    
I am having similar problem. If you find a workaround, please let me know. –  Dilawar Feb 16 '12 at 11:59
    
@Dilawar There is a ticked in bugtracker hackage.haskell.org/trac/hackage/ticket/855 –  Artem Koshelev Feb 28 '12 at 13:29

3 Answers 3

I have got it working with polipo. My university uses http-proxy with authentication. In /etc/polipo/config you need to add these lines

parentProxy = "proxy.server.com:80"
parentAuthCredentials = "myusername:mypassword"

And export http_proxy=http://localhost:8123". And it worked like a charm.

share|improve this answer

My standard approach to ISA proxies is to configure a local authenticating proxy like cntlm. After installing cntlm on your Ubuntu machine, you configure it to authenticate via NTLM at the ISA proxy with your Windows username and password. Then you set the HTTP_PROXY variable to http://localhost:3128 (i.e. the port that cntlm is listening to).

The advantage of this approach is that only one program has to deal with the Windows proxy. All other programs can pass through by using cntlm as their gateway.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.