Support a graphical prompt
mvdan opened this issue · comments
For example, the only way to supply a two-factor auth token is via the terminal. We should support graphical prompts. This is useful to make usage easier, and to allow starting the D-Bus service without hard-coding passwords anywhere.
I'm unsure how this could be done. Tools like zenity
may not be installed. Depending on GTK or Qt would be overkill. Perhaps the simplest would be an askpass
config option, similar to what git
has.
I still think that an askpass
option is best, with a sane default. The sane default would be:
- the current command-line prompt if we're not in a graphical environment
- the
askpass
program if it's set in the config - the first available askpass program installed in the system, such as
ssh-askpass
,zenity --password
, etc. - otherwise we fall back to the command-line prompt