首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >git发送-电子邮件设置失败

git发送-电子邮件设置失败
EN

Ask Ubuntu用户
提问于 2023-01-23 07:44:04
回答 2查看 307关注 0票数 0

我无法设置git发送邮件来发送修补程序.

代码语言:javascript
运行
复制
os platform: Ubuntu22.04 LTS
linux kernel: 5.15.0-58-generic 
git virsion: 2.34.1

我跟着这两个向导。

  1. git设置指南
  2. 微软配置 vishi@射手:~/$ cat ~/..gitconfig name = vishalsinh电子邮件= vishalsinh.parmar@siliconsignals.io autocrlf = false smtpencryption = STARTTLS smtpserver =smtp.office 365.com smtpUser = vishalsinh.parmar@siliconsignals.io smtpServerPort = 587 smtpServerPort= auto

用这种方式指挥。

代码语言:javascript
运行
复制
vishi@striker:~/$ ls outgoing/
0000-cover-letter.patch  0001-PATCH-test.patch
vishi@striker:~/$ git send-email outgoing/* --smtp-debug=1

我的错误越来越严重了。

代码语言:javascript
运行
复制
Net::SMTP>>> Net::SMTP(3.13)
Net::SMTP>>>   Net::Cmd(3.13)
Net::SMTP>>>     Exporter(5.76)
Net::SMTP>>>   IO::Socket::IP(0.41)
Net::SMTP>>>     IO::Socket(1.46)
Net::SMTP>>>       IO::Handle(1.46)
Net::SMTP=GLOB(0x561947328538)<<< 220 PN2PR01CA0160.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 23 Jan 2023 14:41:27 +0000
Net::SMTP=GLOB(0x561947328538)>>> EHLO striker..
Net::SMTP=GLOB(0x561947328538)<<< 501 5.5.4 Invalid domain name [PN2PR01CA0160.INDPRD01.PROD.OUTLOOK.COM]
Net::SMTP=GLOB(0x561947328538)>>> HELO striker..
Net::SMTP=GLOB(0x561947328538)<<< 501 5.5.4 Invalid domain name [PN2PR01CA0160.INDPRD01.PROD.OUTLOOK.COM]
Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=smtp.office365.com encryption=STARTTLS hello=striker.. port=587 at /usr/lib/git-core/git-send-email line 1648.

请给出提示或文档,我可以参考解决方案。

更新日期:2023年1月31日

今天,我专门通过下面的命令添加域名,解决了域名问题。在此之后,出现了加密问题,称为git发送-电子邮件没有"STARTTLS“(git有TLS/SSL加密)。所以把它设为"tls“

代码语言:javascript
运行
复制
git config --global sendemail.smtpDomain "siliconsignals.io"
git config --global sendemail.smtpencryption tls

现在,microsoft AAD (Azure Active Directory)的安全默认值禁止SMTP编辑。所以我犯了个低音错误。

使用调试日志:

代码语言:javascript
运行
复制
$ git send-email --to=vishistriker@gmail.com outgoing/* --smtp-debug=1
outgoing/0001-biuld-bootloader-host-in-AI-100-so-it-will-work-out-.patch
(mbox) Adding cc: vishalsinh_sisignals  from line 'From: vishalsinh_sisignals '

From: vishalsinh 
To: vishistriker@gmail.com
Cc: vishalsinh_sisignals 
Subject: [PATCH] biuld bootloader host in AI-100 so it will work out of box
Date: Tue, 31 Jan 2023 15:48:39 +0530
Message-Id: <20230131101839.31432-1-vishalsinh.parmar@siliconsignals.io>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

    The Cc list above has been expanded by additional
    addresses found in the patch commit message. By default
    send-email prompts before sending whenever this occurs.
    This behavior is controlled by the sendemail.confirm
    configuration setting.

    For additional information, run 'git send-email --help'.
    To retain the current behavior, but squelch this message,
    run 'git config --global sendemail.confirm auto'.

Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): y
Net::SMTP>>> Net::SMTP(3.13)
Net::SMTP>>>   Net::Cmd(3.13)
Net::SMTP>>>     Exporter(5.76)
Net::SMTP>>>   IO::Socket::IP(0.41)
Net::SMTP>>>     IO::Socket(1.46)
Net::SMTP>>>       IO::Handle(1.46)
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 220 BM1PR01CA0158.outlook.office365.com Microsoft ESMTP MAIL Service ready at Tue, 31 Jan 2023 10:18:41 +0000
Net::SMTP=GLOB(0x55f2e33df4e0)>>> EHLO siliconsignals.io
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-BM1PR01CA0158.outlook.office365.com Hello [122.170.105.202]
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-SIZE 157286400
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-PIPELINING
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-DSN
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-STARTTLS
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-8BITMIME
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-BINARYMIME
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250-CHUNKING
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 250 SMTPUTF8
Net::SMTP=GLOB(0x55f2e33df4e0)>>> STARTTLS
Net::SMTP=GLOB(0x55f2e33df4e0)<<< 220 2.0.0 SMTP server ready
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> EHLO siliconsignals.io
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-BM1PR01CA0158.outlook.office365.com Hello [122.170.105.202]
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-SIZE 157286400
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-PIPELINING
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-DSN
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-AUTH LOGIN XOAUTH2
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-8BITMIME
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-BINARYMIME
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-CHUNKING
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250 SMTPUTF8
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> EHLO siliconsignals.io
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-BM1PR01CA0158.outlook.office365.com Hello [122.170.105.202]
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-SIZE 157286400
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-PIPELINING
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-DSN
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-AUTH LOGIN XOAUTH2
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-8BITMIME
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-BINARYMIME
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250-CHUNKING
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 250 SMTPUTF8
Password for 'smtp://vishalsinh.parmar@siliconsignals.io@smtp-legacy.office365.com:587': 
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> AUTH LOGIN
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 334 *********
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< (decoded) Username:
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> (decoded) vishalsinh.parmar@siliconsignals.io
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> dmlzaGFsc2luaC5wYXJtYXJAc2lsaWNvbnNpZ25hbHMuaW8=
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 334 *********
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< (decoded) Password:
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> (decoded) *********
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)>>> U2hpdmE0dmlzaCM=
Net::SMTP::_SSL=GLOB(0x55f2e33df4e0)<<< 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [BM1PR01CA0158.INDPRD01.PROD.OUTLOOK.COM 2023-01-31T10:19:02.295Z 08DB03199EF82C8E]
5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [BM1PR01CA0158.INDPRD01.PROD.OUTLOOK.COM 2023-01-31T10:19:02.295Z 08DB03199EF82C8E]

没有调试日志:

代码语言:javascript
运行
复制
$ git send-email --to=vishistriker@gmail.com outgoing/*
outgoing/0001-biuld-bootloader-host-in-AI-100-so-it-will-work-out-.patch
(mbox) Adding cc: vishalsinh_sisignals  from line 'From: vishalsinh_sisignals '

From: vishalsinh 
To: vishistriker@gmail.com
Cc: vishalsinh_sisignals 
Subject: [PATCH] biuld bootloader host in AI-100 so it will work out of box
Date: Tue, 31 Jan 2023 15:53:39 +0530
Message-Id: <20230131102339.31808-1-vishalsinh.parmar@siliconsignals.io>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): y
Password for 'smtp://vishalsinh.parmar@siliconsignals.io@smtp-legacy.office365.com:587': 
5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [BMXPR01CA0089.INDPRD01.PROD.OUTLOOK.COM 2023-01-31T10:24:01.016Z 08DB03117D6EB381]

现在,从5.7.139错误和提供的链接提供了+这个相似误差链路开始,我发现剩下的唯一问题是我默认的outlook服务器安全默认值"SMTP AUTH“。管理员需要启用它,但因为我不是管理员。我会停在这里,用个人Gmail代替。

EN

回答 2

Ask Ubuntu用户

回答已采纳

发布于 2023-01-31 12:11:53

在到达SMTP后-8月5.7.139错误,如编辑的问题所示。我停止了,因为我没有管理员权限来启用它。

因此,我按照本指南使用gmail进行了"git发送-电子邮件“的替代设置。

  1. gmail设置,通过其他电子邮件平台查看Gmail
  2. git发送电子邮件初始设置
  3. 2因素认证的疑难解答。gmail登录应用程序密码
票数 0
EN

Ask Ubuntu用户

发布于 2023-04-26 18:28:10

smtpencryption = STARTTLS更改为smtpencryption = tls

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1451423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档