Working around Ubuntu's Firewall
来源:互联网 发布:广州管家婆网络 编辑:程序博客网 时间:2024/06/08 02:21
Working around Ubuntu's Firewall
"Git" is a great tool and does work behind proxy's / firewalls with a little help. There are many ways to do this however this section will only cover "corkscrew".
- Corkscrew
Download "corkscrew" at Corkscrew and un-tar it.
cd corkscrew-2.0./configuremakecp corkscrew ~/bin/corkscrew
This can be placed anywhere as long as it is in PATH. Next create the following simple shell script called git-proxy in ~/bin directory (or some place listed in PATH).Replace items inbetween "<...> with the correct information.
#!/bin/shexec <path_to_corkscrew>/corkscrew <proxy_name> <proxy port> $*
Save the file and give it execute permissions
chmod u+x git-proxy
Run it to test it. It should give the usage statement for corkscrew.
Now tell git you want to use a proxy. Replace the stuff between the "<...>" and don't leave out the single quotes.
git config --global core.gitproxy '<path_to_proxy>/git-proxy'
This will setup "git" to always use the proxy for all git commands, with all git trees. To set the proxy for just a specific git tree execute instead something similar to the following. The below command configures "git" to use the proxy for all URLs with a kernel.org suffix.
git config --global core.gitproxy '"<path to proxy>/git-proxy"; for kernel.org' 'for kernel.org$'
- Ubuntu's Firewall setting
Configure Ubuntu's "Network Proxy" appropriately to get access to source code
- System-->Preferences-->Network Proxy
- Set the following parameters:
- Select: "Proxy Configuration"
- Select: "Manual proxy configuration"
- Check mark: "Use the same proxy for all protocols
- Enter following data: HTTP proxy:<enter proxy address> Port: <enter port>
- Close
Configure the Proxy for the package manager:
- System -> Administrator -> Synaptic Package Manager
- Login -> Settings -> Preferences
- Network tab -> Add the HTTP proxy and port number in order to get the package manager to be able to get past the firewall.
Configure "http_proxy" and "ftp_proxy" environmental variable: If there is a need to use a proxy server to access the web set the environment variables "http_proxy" and "ftp_proxy". This will allow "apt-get" etc. to use this environment variable value. Below would be the ideal way of assigning values for "http_proxy":
export http_proxy=”<proxy-server>:<port>” export https_proxy="<proxy-server>:<port>"export ftp_proxy="<proxy-server>:<port>"
Add this to ~/.bashrc so that everytime the machine is rebooted this variable does not have to be exported.
- Working around Ubuntu's Firewall
- ubuntu close Firewall
- UFW (Ubuntu firewall)
- tips on coder's working
- E12 S/MIME working flow:
- Firewall
- firewall
- firewall
- firewall
- firewall
- firewall
- firewall
- firewall
- Firewall
- Firewall
- firewall
- firewall
- firewall
- Direct2D在VC中的使用
- @ResponseBody乱码的解决方案
- HTML5入门
- ofbiz_bug修改
- linux 下编译基于云计算的内核
- Working around Ubuntu's Firewall
- arm-linux-gcc-4.4.3交叉编译google的protobuf。以及使用方法
- Direct2D画背景纹理
- QDockWidget详解
- 用WASD来控制物体的前后左右移动
- android SharedPreferences 详解与开发实例
- 分配职责和职责驱动设计
- python2.7.5安装---zlib死活装不上的解决办法
- google protocol buffer (C++,Java序列化使用实例)