为什么 git-imap-send 似乎正在向 IMAP 连接发送 HTTP?



我希望我在这里没有犯一些明显的错误,但是当尝试使用git imap-send时,在命令git format-patch --signoff --stdout --attach --root HEAD | git imap-send -v中,我得到这个(每个补丁重复一次错误):

$ git format-patch --signoff --stdout --attach --root HEAD | git imap- 
send -v
sending 21 messages
*   Trying 192.168.1.22...
* Connected to mail.tdstoragebay.com (192.168.1.22) port 143 (#0)
* Server auth using Basic with user 'user'
> PUT /INBOX HTTP/1.1
Host: mail.tdstoragebay.com:143
Authorization: Basic auth-token
Accept: */*
Content-Length: 3233
Expect: 100-continue
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] TD-StorageBay Dovecot ready.
PUT BAD Error in IMAP command received by server.
Host: BAD Error in IMAP command received by server.
* BYE Too many invalid IMAP commands.
* Connection #0 to host mail.tdstoragebay.com left intact
* Found bundle for host mail.tdstoragebay.com: 0x1f59250 [serially]
* Connection 0 seems to be dead!
* Closing connection 0

在我看来,git imap-send正在尝试将HTTP数据发送到我的IMAP服务器。我读过的所有文档似乎都没有提到这种行为,imap-send使用正常的 IMAP。如果是这样的话,这是怎么回事,更重要的是,如何解决?

Git 版本:2.7.4

操作系统: Linux Mint 18.3

Git 配置:

imap.host=imap://mail.tdstoragebay.com (internal server)
imap.port=143
imap.folder=INBOX

自 Git 2.7.4 以来,已经有一些与 imap-send 相关的修复

特别是:

  • 提交 d2d07ab "imap-send: 告诉 cURL 使用imap://imaps://" (Git 2.10.2)
  • 提交 690307f"imap-send:如果需要添加包装器以获取服务器凭据"(Git 2.15.0)

这些修复中的任何一个都可能对您的情况产生影响。


"git imap-send"(man) 用于忽略 core.askpass 等配置变量; 这已在 Git 2.30(2021 年第 1 季度)中得到纠正,

参见 提交 5021236 (2020 年 12 月 1 日) 由 Nicolas Morey-Chaisemartin (nmorey).
(由 Junio C Hamano --gitster-- 合并于 提交 18da626, 08 Dec 2020)

imap-send:解析默认的 git 配置

报告人:Philippe Blain
签名者:Nicolas Morey-Chaisemartin

git imap-send git config(man)不会解析默认设置,因此会忽略core.askpass值。

重写配置解析以支持core设置。

升级到 Git 2.18 时,错误似乎已自行解决。虽然我仍然很好奇它为什么首先存在。

最新更新