配置git使用msmtp的gmail账户发信

http://felove.vicp.cc/blog/?action=showlog&gid=5

2007-12-5 20:17 Wednesday 永恒

1.编译git时应用USE flag ="curl",否则是不能通过网络用git的
2.编译msmtp,用msmtp来发邮件
3.修改你的msmtp服务器和账号 ~/.msmtprc内容:
1 defaults
2 tls on
3 account gmail
4 host smtp.gmail.com
5 from youremail@gmail.com
6 auth on
7 user youremail@gmail.com
8 password yourpassword
9 port 587
10 account default:gmail
4.改变.msmtprc的执行权限 chmod 600 .msmtprc
5.设定你在git里使用的账号
方法:
git config --global user.name "FELove" '设定你要使用的用户名
git config --global user.email " night2008@gmail.com" '设定你要发信的邮箱
6.然后你就可以通过git和msmtp上传补丁了
例如:
git-send-email --to email@mailserver.com --subject yoursub yourpatch