繁体   English   中英

如何在 mbsync 中设置密码命令?

[英]How can I set up a password command in mbsync?

isync/mbsync的手册说我可以使用PassCmd而不是Pass

PassCmd [+]command

Specify a shell command to obtain a password rather than specifying a password directly. This allows you to use password files and agents. The command must produce exactly one line on stdout; the trailing newline is optional. Prepend + to the command to indicate that it produces TTY output (e.g., a decryption password prompt); failure to do so will merely produce messier output.

所以我试过:

PassCmd +"/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail-bridge"

PassCmd "/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail-bridge"

和其他变体,但没有任何效果 - 我不断Authenticating with SASL mechanism PLAIN...IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO backend/credentials: incorrect password

然而:在mbsync中对pass的其他调用正如预期的那样工作,我正在以完全相同的方式编写它们。

如果我改用Pass my-password ,我可以让 mbsync 工作,但我不想以纯文本形式存储我的密码。

我可以验证pass命令的 output 与Pass的密码完全相同。 所以出了点问题,我无法弄清楚。

我还尝试在pass回显的文件中添加一个尾随换行符,并添加几个换行符。 我试过追加| head | head命令,看看它是否有效。

如何让 PassCmd 按预期工作?

我在 NixOS 上,顺便说一句。

isync/mbsync的手册说我可以使用PassCmd而不是Pass

PassCmd [+]command

Specify a shell command to obtain a password rather than specifying a password directly. This allows you to use password files and agents. The command must produce exactly one line on stdout; the trailing newline is optional. Prepend + to the command to indicate that it produces TTY output (e.g., a decryption password prompt); failure to do so will merely produce messier output.

所以我试过:

PassCmd +"/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail-bridge"

PassCmd "/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail-bridge"

和其他变体,但没有任何效果 - 我不断Authenticating with SASL mechanism PLAIN...IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO backend/credentials: incorrect password

然而:在mbsync中对pass的其他调用正如预期的那样工作,我正在以完全相同的方式编写它们。

如果我改用Pass my-password ,我可以让 mbsync 工作,但我不想以纯文本形式存储我的密码。

我可以验证pass命令的 output 与Pass的密码完全相同。 所以出了点问题,我无法弄清楚。

我还尝试在pass回显的文件中添加一个尾随换行符,并添加几个换行符。 我试过追加| head | head命令,看看它是否有效。

如何让 PassCmd 按预期工作?

我在 NixOS 上,顺便说一句。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM