public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-packager] epel10.2: fkinit: Allow to pass the OTP token via $FKINIT_OTP
@ 2026-06-25 13:20 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-25 13:20 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedora-packager
            Branch : epel10.2
            Commit : 56bb70b205af4a5b7158e907b2499f1954d78db5
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2025-02-06T14:39:00-05:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-packager/c/56bb70b205af4a5b7158e907b2499f1954d78db5?branch=epel10.2

            Log:
            fkinit: Allow to pass the OTP token via $FKINIT_OTP

This allows me to run:

    $ FKINIT_OTP=$(ykman oath accounts code accounts.fedoraproject.org --single) fkinit

I can even alias this:

    $ alias fkinit='FKINIT_OTP=$(ykman oath accounts code accounts.fedoraproject.org --single) fkinit'

And the invocation then looks like this:

    $ fkinit
    Touch your YubiKey...
    🔐 FAS password: (press TAB for no echo)

Signed-off-by: Miro Hrončok <miro@hroncok.cz>

---
diff --git a/fkinit b/fkinit
index 1d53287..077678d 100755
--- a/fkinit
+++ b/fkinit
@@ -104,7 +104,7 @@ fi
 kinit -n @$domain -c FILE:$armorcache
 
 F_PASSWORD=$(systemd-ask-password "FAS password:")
-F_OTP=$(systemd-ask-password "FAS OTP (leave blank if not configured):")
+F_OTP=${FKINIT_OTP:-$(systemd-ask-password "FAS OTP (leave blank if not configured):")}
 
 kinit -T FILE:$armorcache $_arg_user@$domain <<< "${F_PASSWORD}${F_OTP}" >/dev/null
 unset F_PASSWORD

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 13:20 [rpms/fedora-packager] epel10.2: fkinit: Allow to pass the OTP token via $FKINIT_OTP 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox