Created
November 20, 2021 02:54
-
-
Save myl7/18193e1405894060d38fedf413b80f96 to your computer and use it in GitHub Desktop.
git with proxy for github.com
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
[http "https://github.com"] | |
proxy = http://127.0.0.1:10800 | |
[https "https://github.com"] | |
proxy = http://127.0.0.1:10800 |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
# Use the script to call git clone like: | |
# git.sh clone [email protected]:AppFlowy-IO/appflowy.git | |
if [[ "$1" == clone ]] && [[ "$2" =~ ^git@github\.com ]]; then | |
# git ssh:// can literally work with proxychains | |
proxychains -q git "$@" | |
else | |
git "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since currently proxychains-ng breaks to proxy SSH, now the git.sh file is useless