簡體   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