Coder Social home page Coder Social logo

Comments (5)

DAlperin avatar DAlperin commented on June 12, 2024

Interestingly manually testing by way of sudo su also works. I copied over the prudent information from the gpg-agent process /proc/environ

[root@DovDev:/etc/nixos]# export GNUPGHOME=/var/lib/gnupg
[root@DovDev:/etc/nixos]# /nix/store/wh4g47b3l5prx25iyf9rlcl5qasjrzzf-gnupg-2.2.27/bin/gpg --list-keys
gpg: WARNING: unsafe permissions on homedir '/var/lib/gnupg'
/var/lib/gnupg/pubring.kbx
--------------------------
pub   rsa3072 2022-01-04 [SC] [expires: 2024-01-04]
---snip---

from sops-nix.

Mic92 avatar Mic92 commented on June 12, 2024

Does it work, if you fix this warning?

gpg: WARNING: unsafe permissions on homedir '/var/lib/gnupg'

from sops-nix.

DAlperin avatar DAlperin commented on June 12, 2024

No:

[root@DovDev:/etc/nixos]# export GNUPGHOME=/var/lib/gnupg

[root@DovDev:/etc/nixos]# /nix/store/wh4g47b3l5prx25iyf9rlcl5qasjrzzf-gnupg-2.2.27/bin/gpg --list-keys
/var/lib/gnupg/pubring.kbx
--------------------------
---snip---
dovalperin in nixos at DovDev on  main [!+?] took 12s ➜ sudo nixos-rebuild switch
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
/nix/store/cx01anlvsgf23y7m801wmwmmrm9jark4-sops-install-secrets-0.0.1/bin/sops-install-secrets: Failed to decrypt '/nix/store/kyygj6xkax7qziizh8lhlh00s69jhgbf-example.yaml': Error getting data key: 0 successful groups required, got 0
Activation script snippet 'setupSecrets' failed (1)
reloading user units for dovalperin...
setting up tmpfiles
warning: error(s) occurred while switching to the new configuration

from sops-nix.

Mic92 avatar Mic92 commented on June 12, 2024

If you run sops <yoursecret.yaml> as root with the gpg2 executable in your $PATH, does it than works with your export GNUPGHOME=/var/lib/gnupg?

from sops-nix.

Mic92 avatar Mic92 commented on June 12, 2024

Closing because lack of feedback. In general if you have issues with gpg, I would suggest to use age instead. GPG is not good software.

from sops-nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.