The floxmeta private repo was created alright, though I wasn’t expecting flox to run the gh CLI on my behalf as a newcomer. I expect that’s covered in a user manual I haven’t read yet.
I think Git is trying to insist on signing something because of the global config.
❯ sudo apt install /tmp/flox.x86_64-linux.deb
# ...
❯ flox install cowsay
Updating git config "/home/kbingham/.config/flox/gitconfig"
> Do you consent to the collection of basic usage metrics? Yes
Thank you for helping to improve flox!
Did not find "/home/kbingham/.config/flox/floxUserMeta.json", continuing without user channels
Updating /home/kbingham/.config/flox/nix.conf
error: gpg failed to sign the data
fatal: failed to write commit object
++++ /nix/store/l5h79qqg73cgjvhkyp1g93r1kg2j10qa-flox-0.0.10-r205/libexec/flox/gh repo create --private https://github.com/qrkourier/floxmeta --template https://github.com/flox/floxmeta-template.git
error: pathspec 'floxmain' did not match any file(s) known to git
error: gpg failed to sign the data
fatal: failed to write commit object
fatal: invalid object name 'floxmain'.
error: pathspec 'floxmain' did not match any file(s) known to git
❯ flox install cowsay
ERROR: missing field `channels` at line 4 column 1
❯ which cowsay
cowsay not found
❯ git config --global commit.gpgSign
true
I wondered whether flox was failing because git couldn’t get a tty, so I tried it with the signing cred cached so it wouldn’t need to prompt for pinentry. If I can figure out where the git working copy is located I can set a local git config to not attempt signing. I’d like to avoid changing the global config.
❯ flox destroy --environment qrkourier/default
flox [default]
❯ rm -rfv ~/.config/flox/
removed '/home/kbingham/.config/flox/floxUserMeta.json'
removed '/home/kbingham/.config/flox/nix.conf'
removed '/home/kbingham/.config/flox/gitconfig'
removed '/home/kbingham/.config/flox/floxFlakeRegistry.json'
removed directory '/home/kbingham/.config/flox/'
❯ gpg --clearsign
gpg: using "5489E13F810564DF47FB9841B69403FA957C5E46" as default secret key for signing
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEVInhP4EFZN9H+5hBtpQD+pV8XkYFAmQeA2QACgkQtpQD+pV8
XkbMahAAlfsldUvl7lMyfmmxNTy6AzVFX/D7ctjp31v3D64idY14AeUA3L32SzPg
hkEhMdukxAxG6NpT13Bk6ykGdzlFSNmwhvWyqv5lellPHt2eb8xdiasbJPqjiMld
FzsotdK3OW1IwlGmqKM/2fiNKm3/PUAC98IxETxopVaCqEr3kj/jzFS5swXNw7ZQ
akNyCAd7qRjDPyQJHIYKoLR36AvlKoxptc9sJgOBPAme74XT0650Wlcov6Rcm5f9
dezMXFdNuaVPFIrFxuIOOBiBhVPpLbiAQotOZJZuYSJ2sHid1CS6smip+N9kb/uf
S9q1MwkDTuYX84O35GV48V+Ci/BMvnK2PMebW2Wdj9WRATYDkR2ajFbVcZGwGC6a
UQ6kKyP3Dn5pVcahnyahcEScgA+euipmrFPxH4T1/ugetEowDH/QRHmHoIoCHP3h
U1/xR8D8Ezsx4s0RYDyekZROZ/YUFAzZlRW+PorptG3HaBm33friYMUWAbRoUQZE
zNK4wBukcdx9Km4QuRtXpmflh29T+nZGyYDw6c32yyhMvkRzv22B7KDi5vWrB9uh
lz8UgpVq55HfGVVsodNWD6pXVsDScgTl3O546Tw9QUwyocMd0lnMI5A9KPmwwu1+
yv2nkBI8M8dEo9ULYAoXbo3sQpzi1V0+Ux5nulHRb4sEYpLmmk8=
=Bbd3
-----END PGP SIGNATURE-----
❯ flox install cowsay
Updating git config "/home/kbingham/.config/flox/gitconfig"
Did not find "/home/kbingham/.config/flox/floxUserMeta.json", continuing without user channels
Updating /home/kbingham/.config/flox/nix.conf
error: gpg failed to sign the data
fatal: failed to write commit object
Hmm, I also use GPG signing and didn’t have problems with Flox. I use gpg for windows though that is used through WSL binding and win-gpg-agent. Maybe the gpg-agent is not saving data in this special case ? Have you tried pinnning gpg binary in .gitconfig to one you use outside flox ?
I encountered the same error after pinning the gpg executable. Additionally, I tried installing a GTK pinentry program, restarted gpg-agent. I get the same result whether or not the default signing key is cached by a recent, prior signing action.
Having said that, this is obnoxious and I’ll be chasing down a real solution.
I’ll pass this off to the engineering team to investigate; hopefully we can get a quick fix.
Thank you! I’m unblocked with this workaround. It was the global config causing my issue so I adapted your script to use a temporary modification of that file.