Expand description
askpass mode: ssh runs $SSH_ASKPASS "<prompt>" and reads the answer on
stdout. When AgentMux runs ssh for an agent it points SSH_ASKPASS here
and sets AGENTMUX_ASKPASS_SECRET on that ssh only; this asks srv
(POST /api/v1/askpass), which shows the prompt to the user, and prints
their answer. The secret, not anything here, decides whose prompt it is
(srv’s backend::remote::askpass).
Recognised before clap runs: ssh passes the prompt as the only argument, with no subcommand.
Constants§
- ANSWER_
TIMEOUT 🔒 - Longer than srv waits for the user (two minutes), so srv’s own answer, or its “not answered”, is what arrives.
- ENV_
SECRET 🔒 - SUBCOMMANDS 🔒
- bashwrap’s own subcommands: never an askpass call, even if the variable was inherited by something run under that ssh.
Functions§
- askpass_
prompt - The prompt, when this run is ssh asking: the secret is set and the arguments are not a bashwrap subcommand.
- run_
if_ asked - Run askpass mode if this is an askpass call:
Some(exit code)(0 with the answer on stdout, 1 when there is none),Noneto carry on as bashwrap.