Cabal无法通过身份验证代理 [英] Cabal fails with proxy with authentication

查看:134
本文介绍了Cabal无法通过身份验证代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个众所周知的错误, cabal 无法处理格式为 http:// user:password @ host:port 格式。在Haskell邮件列表中,有人提出了一个补丁来解决此问题,但是该补丁现在已经很老了。

This is a well-known bug that cabal can not handle proxies in format http://user:password@host:port format. On Haskell mailing list, someone suggested a patch to overcome this but that patch is now quite old.

失败,并显示以下消息

   Downloading the latest package list from hackage.haskell.org
   Warning: invalid http proxy uri:
   "http://user:pass@host:80/"
   Warning: proxy uri must be http with a hostname
   Warning: ignoring http proxy, trying a direct connection

有人知道如何让阴谋集团使用我的代理设置?任何间接方法也可以做到,例如代理绕过等。

Does anyone know how to make cabal use my proxy settings? Any indirect method will also do such as proxy bypassing etc.

A ,但在那里没有回答。

A similar question is asked on superuser but it is not answered there.

推荐答案

我已经将它与 polipo 。我的大学使用 http-proxy 进行身份验证。在 / etc / polipo / config 中,您需要添加以下行

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"

然后导出 http_proxy = http:// localhost:8123 。它就像一个符咒。

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

这篇关于Cabal无法通过身份验证代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆