zsh-quickstart-kit
zsh-quickstart-kit copied to clipboard
Add functionality to not use an x ssh-askpass gui when your ssh key has a passphrase
Following on from #141 I have found out why ssh-add
prompts for a gui askpass app instead of the cli when you are in a running terminal already.
From a ssh-add
manpage I found online, the following info;
If ssh-add does not have a terminal associated with it but
DISPLAY and SSH_ASKPASS are set, it will execute the
program specified by SSH_ASKPASS (by default “ssh-askpass”)
and open an X11 window to read the passphrase.
I have now tested this by setting this var right before the line where the load-our-ssh-keys()
is called: export SSH_ASKPASS_REQUIRE=never
@unixorn you mentioned you are doing a refactor in #189 and we talked about how this could be enabled/disabled using the .zqs_get/set
functions approach you would like to take.
I could have a go at this once you have merged the updates for that, and given some feedback on how it should be handled in the settings. Maybe using this function call.
I noticed there is no option to load the new EdDSA
keys like ed25519
, I could tag this onto this one or a separate branch if you like.
@dglynn, #189 is merged now if you want to work on this.
@dglynn, #189 is merged now if you want to work on this.
@unixorn, I finally have time to look at this, it's been a while can you link me to some examples of how you have done this in the #189 commit.
The first argument to _zqs-get-setting
is the settings name (only use filename-safe characters), and the second is the default value to return if there's no existing setting.
Here's an example
# We assume foo_enabled is true unless the user has explicitly disabled it with _zqs-set-setting
if [[ $(_zqs-get-setting foo_enabled true) == 'true' ]]; then
# Do the enabled case
else
# Do the disabled case
fi
I should really expose _zqs-set-setting
and _zqs-get-setting
as visible zqs
commands users can use for arbitrary settings.
Created https://github.com/unixorn/zsh-quickstart-kit/issues/207 to expose the commands
@unixorn I have now got the branch ready locally for this change, I cannot push to your repo? Is it possible to do this to open the change request for review or should I fork first?
Fork first, please, then do the PR from there.