git send-email无法发送消息

时间:2019-06-03 04:44:39

标签: git ubuntu smtp sendmail smtpclient

我正在尝试发送git补丁进行上游社区审查;但是接收者没有收到消息;

我尝试将'--to'更改为我的私人电子邮件ID之一,但即使在我的私人邮箱中也没有收到该电子邮件ID;

命令:

git send-email --no-chain-reply-to --from "Ganapathi Bhat <xxx@gmail.com>" --to linux-wireless@vger.kernel.org my_patch.patch

输出:

Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=smtp.gmail.com encryption=tls hello=yyy.yyy.com port=587 at /usr/lib/git-core/git-send-email line 1506

命令:

git config -l

输出:

user.email=xxx@gmail.com
user.name=Ganapathi Bhat
sendemail.smtpencryption=tls
sendemail.smtpserver=smtp.gmail.com
sendemail.smtpuser=xxx@gmail.com
sendemail.smtpserverport=587

该修补程序应交付给社区进行审核,并且应显示在以下列表中: https://patchwork.kernel.org/project/linux-wireless/list/

1 个答案:

答案 0 :(得分:1)

考虑git send-email man page,测试添加等于('=')是否会改变任何内容:

git send-email --no-chain-reply-to --from="Ganapathi Bhat" --to=linux-wireless@vger.kernel.org my_patch.patch
                                        ^^^                   ^^^

下一步是检查您的sendemail configgit config -l
参见Git Tips
例如,使用GMail:

git send-email现在支持TSL / SSL,因此使用gmail就像设置以下配置变量一样简单:

[sendemail]
    smtpencryption = tls
    smtpserver = smtp.gmail.com
    smtpuser = yourname@gmail.com
    smtpserverport = 587