Last active
November 1, 2018 18:03
-
-
Save ikennaokpala/6813143 to your computer and use it in GitHub Desktop.
Behind enemy lines (full proxy setup)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Export your shell environment for http proxy use | |
export http_proxy="http://hostname:port" or save it to your shell profile. (i.e. ~/.bash_rc) | |
export http_proxy='http://example.proxy_name.com:80' | |
For multi-user installs, use sudo -E to preserve the proxy settings in your environment: | |
Setting git to use a proxy | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
git config --global http.proxy %http_proxy% | |
Set your git tool to use the environment proxy inside you ~/.gitconfig | |
[http] | |
proxy = %http_proxy% | |
[url "https://github.com/"] | |
insteadOf = git://github.com | |
http://www.ubuntugeek.com/how-to-use-ssh-via-http-proxy-using-corkscrew-in-ubuntu.html | |
http://stackoverflow.com/questions/1040089/how-do-i-use-github-through-harsh-proxies | |
ProxyCommand /usr/bin/corkscrew 172.25.66.1 8080 %h %p ~/.corkscrew-auth | |
Host github.com | |
User git | |
Port 22 | |
Hostname github.com | |
IdentityFile "~/ssh/id_rsa" | |
TCPKeepAlive yes | |
IdentitiesOnly yes | |
Host ssh.github.com | |
User git | |
Port 443 | |
Hostname ssh.github.com | |
IdentityFile "~/ssh/id_rsa" | |
TCPKeepAlive yes | |
IdentitiesOnly yes | |
Using RVM behind a proxy | |
There are a few ways to use RVM from behind a proxy. | |
--proxy | |
You can pass the proxy sever to use directly to RVM: | |
rvm install X --proxy $domain_or_ip:$port | |
Using CURL | |
Set the proxy inside your ~/.curlrc: | |
proxy = example.proxy_name.com:80 | |
or | |
/home/usr/.curlrc | |
proxy = proxy.proxyhost.com:8443 | |
proxy-user = user:pass | |
proxy-ntlm = true | |
noproxy = localhost,127.0.0.1,intraweb.company.com | |
in /etc/apt/apt.conf | |
Acquire::http::proxy "http://user:password@localhost:8080/"; | |
Acquire::https::proxy "https://user:password@localhost:8080/"; | |
Acquire::ftp::proxy "ftp://user:password@localhost:8080/"; | |
Acquire::socks::proxy "socks://user:password@localhost:8080/"; | |
in bashrc | |
export http_proxy=http://user:password@locahost:8080 | |
export https_proxy=http://user:password@locahost:8080 | |
export HTTP_PROXY=http://user:password@locahost:8080 | |
export HTTPS_PROXY=http://user:password@locahost:8080 | |
In the /etc/wgetrc | |
http_proxy=http://user:password@locahost:8080 | |
https_proxy=http://user:password@locahost:8080 | |
HTTP_PROXY=http://user:password@locahost:8080 | |
HTTPS_PROXY=http://user:password@locahost:8080 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment