Created
October 28, 2016 07:58
-
-
Save xight/fb03009fb725e33245c0697386d9836f to your computer and use it in GitHub Desktop.
set-proxy.sh
This file contains 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
function set_proxy() { | |
export http_proxy=$1 | |
export HTTP_PROXY=$1 | |
export ftp_proxy=$1 | |
export FTP_PROXY=$1 | |
export all_proxy=$1 | |
export ALL_PROXY=$1 | |
export https_proxy=$1 | |
export HTTPS_PROXY=$1 | |
git config --global http.proxy $1 | |
git config --global https.proxy $1 | |
git config --global url."https://".insteadOf git:// | |
} | |
function set_no_proxy() { | |
export NO_PROXY=$1 | |
export no_proxy=$1 | |
} | |
function unset_proxy() { | |
unset http_proxy | |
unset HTTP_PROXY | |
unset ftp_proxy | |
unset FTP_PROXY | |
unset all_proxy | |
unset ALL_PROXY | |
unset https_proxy | |
unset HTTPS_PROXY | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
git config --global --unset url."https://".insteadOf | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment