config proxy for http/https
1 | git config --global http.proxy socks5://127.0.0.1:1080 |
or edit the file ~/.gitconfig and add the following item
1 | [http] |
config proxy for ssh
install proxychains
use the tool proxychains, run the following command to install in arch Linux based distributions (i.e. Manajaro).
1 | sudo pacman -S proxychains-ng |
config proxychains
edit the file /etc/proxychains.conf, add a line in the ProxyList item
1 | [ProxyList] |
set up alias
Open the file ~/.zshrc (in manjaro) and add the following line:
1 | alias git="proxychains -q git" |
Now you can use git commands by ssh if a public ssh-key has been shared to your account on Github.com.