ITeye博客

ubuntu 12.04的代理设置

dss16694 · 2013-04-09 15:48 · android · 移动开发 · Markdown

ubuntu 12.04的代理设置

      安装了ubuntu的最新LTS版本 12.04, 需要重新下载android的源码,由于公司使用了代理服务器,在网络配置方面方面遭遇了各种问题,系统动不动就弹出407 Proxy Authentication Required,不厌其烦~

 1.apt-get 设置代理

在目录/etc/apt中找到apt.conf文件,按照如下方式设置即可,例如用户名为sgj, 密码为shiguojun

Acquire::http::proxy "http://sgj:shiguojun@10.0.2.254:8080/";

 

2.repo 设置代理。

 

查了好半天,还是在google的说明里面找到了方法。

 

Troubleshooting network issues

When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:

$ export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
$ export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>

HTTP_PROXY是设置http代理,HTTPS_PROXY是设置https代理。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。