git send-email use proxy
2018-10-22T18:25:00+08:00
再见理想
git send-email
not work with normal git proxy config, proxychains
is a general proxy for Linux normal shell command, but not work with git send-email
.
So, basic we need tell send-email
use another smtp client msmtp
which compatible proxychains
.
Check List
sudo apt-get install msmtp
vi ~/.msmtprc
# Example for a user configuration file
# Set default values for all following accounts.
defaults
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/msmtp.log
# My email service
account gmail
host smtp.gmail.com
port 587
from <your-gmail-id>@gmail.com
auth on
user <your-gmail-id>@gmail.com
password <your-gmail-password>
# Set a default account
account default : gmail
chmod 0600 ~/.msmtprc
sudo apt-get install proxychains
vi /etc/proxychains.conf
[ProxyList]
# add proxy here ...
socks5 127.0.0.1 1080
vi ~/.gitconfig
[sendemail]
smtpserver = /usr/bin/msmtp
- now enjoy
proxychains git send-email --to=criu@openvz.org your-commit.patch