# Need help diagnosing the error I got from first install attempt

**URL:** https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703
**Category:** Help
**Tags:** closed
**Created:** [March 24, 2023, 7:52pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703 "2023-03-24T19:52:22Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![qrKourier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/qrkourier/32/569_2.png) [@qrKourier](https://discourse.flox.dev/u/qrKourier)
#### Post date: [March 24, 2023, 7:52pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/1 "2023-03-24T19:52:22Z")

</div>

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.

```auto
❯ 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

```

---

<div class="post-metadata">

### Author: ![qrKourier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/qrkourier/32/569_2.png) [@qrKourier](https://discourse.flox.dev/u/qrKourier)
#### Post date: [March 24, 2023, 8:05pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/2 "2023-03-24T20:05:18Z")

</div>

This seems to confirm it was a global Git option.

```bash
❮ 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 directory '/home/kbingham/.config/flox/'

❯ GIT_CONFIG_GLOBAL=/dev/null 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: pathspec 'floxmain' did not match any file(s) known to git
created generation 1

❯ flox activate
flox [default] 

❯ cowsay more\ better
 _____________ 
< more better >
 ------------- 
        \ ^__^
         \ (oo)\ _______
            (__)\ )\/\
                ||----w |
                || ||
flox [default] 

```

---

<div class="post-metadata">

### Author: ![qrKourier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/qrkourier/32/569_2.png) [@qrKourier](https://discourse.flox.dev/u/qrKourier)
#### Post date: [March 24, 2023, 8:14pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/3 "2023-03-24T20:14:17Z")

</div>

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.

```bash
❯ 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

```

---

<div class="post-metadata">

### Author: ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)
#### Post date: [March 24, 2023, 10:44pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/4 "2023-03-24T22:44:40Z")

</div>

Howdy, sorry to hear that you’re having install troubles. I’ll send this along to the engineers to get you some help.

We’ll do some debugging with you on Monday.

---

<div class="post-metadata">

### Author: ![anon59756714](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon59756714](https://discourse.flox.dev/u/anon59756714)
#### Post date: [March 25, 2023, 9:21am UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/5 "2023-03-25T09:21:59Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![qrKourier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/qrkourier/32/569_2.png) [@qrKourier](https://discourse.flox.dev/u/qrKourier)
#### Post date: [March 27, 2023, 3:31pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/6 "2023-03-27T15:31:07Z")

</div>

Thanks!

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.

```bash
❯ git config --global gpg.program $(which gpg)

❯ git config --global gpg.program             
/usr/bin/gpg

❯ 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

❯ git config --global --list    
init.defaultbranch=main
init.templatedir=~/.git_template
push.default=current
color.ui=auto
alias.aa=add --all
alias.ap=add --patch
alias.branches=for-each-ref --sort=-committerdate --format="%(color:blue)%(authordate:relative)	%(color:red)%(authorname)	%(color:white)%(color:bold)%(refname:short)" refs/remotes
alias.ci=commit -v
alias.co=checkout
alias.pf=push --force-with-lease
alias.st=status
alias.br=branch
core.excludesfile=~/.gitignore
core.autocrlf=input
merge.ff=only
commit.template=~/.gitmessage
commit.gpgsign=true
fetch.prune=true
rebase.autosquash=true
rebase.instructionformat=(%an <%ae>) %s
include.path=~/.gitconfig.local
diff.colormoved=zebra
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
pager.log=less --quit-if-one-screen --no-init
gpg.program=/usr/bin/gpg

```

---

<div class="post-metadata">

### Author: ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)
#### Post date: [March 27, 2023, 6:36pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/7 "2023-03-27T18:36:17Z")

</div>

I was able to reproduce your issue by running:

```auto
git config commit.gpgsign true;
flox create -e foo;

```

For the time being you could do something like:

```auto
GIT_CONFIG_TMP="$( mktemp; )";
cp "${GIT_CONFIG_SYSTEM:-/etc/gitconfig}" "$GIT_CONFIG_TMP";
git config -f "$GIT_CONFIG_TMP" commit.gpgsign false;
GIT_CONFIG_SYSTEM="$GIT_CONFIG_TMP" flox <CMD>;

```

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.

---

<div class="post-metadata">

### Author: ![anon59756714](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon59756714](https://discourse.flox.dev/u/anon59756714)
#### Post date: [March 28, 2023, 8:40am UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/8 "2023-03-28T08:40:46Z")

</div>

I just tested out my local cached repo and it is signed

λ C:\Users\dgoslawski\scoop\apps\gpg\current\bin\gpg.exe --version  
gpg (GnuPG) 2.4.0  
libgcrypt 1.10.1

with win-gpg-agent from scoop also

---

<div class="post-metadata">

### Author: ![qrKourier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/qrkourier/32/569_2.png) [@qrKourier](https://discourse.flox.dev/u/qrKourier)
#### Post date: [March 28, 2023, 12:31pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/9 "2023-03-28T12:31:39Z")

</div>

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.

```bash
❯ which flox_install
flox_install () {
        [[$# -eq 1]] || {
                echo "ERROR: usage: flox_install PACKAGE" >&2
                return 1
        }
        (
                set -euo pipefail
                GIT_CONFIG_TMP="$( mktemp )" 
                cp "${GIT_CONFIG_GLOBAL:-${HOME}/.gitconfig}" "$GIT_CONFIG_TMP"
                GIT_CONFIG_GLOBAL="$GIT_CONFIG_TMP" git config --global commit.gpgsign false
                GIT_CONFIG_GLOBAL="$GIT_CONFIG_TMP" flox install $1
        )
}

❯ git config --global commit.gpgSign
true

❯ flox_install cowsay
Did not find 'channels' in "/home/kbingham/.config/flox/floxUserMeta.json", consider running 'flox subscribe'
Installed 'cowsay' package(s) into 'default' environment.

❯ git config --global commit.gpgSign 
true

❯ flox activate
Did not find 'channels' in "/home/kbingham/.config/flox/floxUserMeta.json", consider running 'flox subscribe'

flox [default] 
❯ cowsay more\ better
 _____________ 
< more better >
 ------------- 
        \ ^__^
         \ (oo)\ _______
            (__)\ )\/\
                ||----w |
                || ||

```

---

<div class="post-metadata">

### Author: ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)
#### Post date: [March 30, 2023, 9:04pm UTC](https://discourse.flox.dev/t/need-help-diagnosing-the-error-i-got-from-first-install-attempt/703/10 "2023-03-30T21:04:46Z")

</div>

Hi @qrKourier - so glad to hear you are unblocked!  
We have logged the bug to sort a proper fix and look forward to rolling it out in a future release.
