Giter Club home page Giter Club logo

Comments (11)

felixfontein avatar felixfontein commented on August 22, 2024

Which version of sops are you using?

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

3.8.1 from nixpkgs unstable, although I’ve checked with nixos-23.11 with the same sops version and nixos-23.05 which is version 3.7.3. Exactly the same results with each.

from sops.

felixfontein avatar felixfontein commented on August 22, 2024

The problem is probably that no config file was found. In that case, conf is nil, and accessing conf.KeyGroups results in the error you're reporting. Can you check whether you have a .sops.yaml in the same directory as secrets.yaml, or somewhere further up in the tree? My guess is that you don't have such a file, or that it doesn't have any creation rules.

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

My .sops.yaml is further up the tree, but I haven’t had any trouble until trying to add a new key today. I can also still access secrets.yaml just not update the keys.

from sops.

felixfontein avatar felixfontein commented on August 22, 2024

Does .sops.yaml contain creation_rules?

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

Yes, with the ´path_regex’ pointing to ´secrets.yaml$’ and ´key_groups’ containing the age passwords for each corresponding key. I should not that what’s happened is that one of my machines died and I lost the private key so I’ve updated the age value of one of these entries. I don’t think this should be a problem, but just in case.

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

Sorry about formatting, I’m currently on my phone

from sops.

felixfontein avatar felixfontein commented on August 22, 2024

Hmm, I checked all possible code paths, the only way I can produce the crash you have is if creation_rules is missing from (or misspelled in) .sops.yaml.

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

Wow, okay... yes there was an accidental added before keys when I updated the .sops.yaml. Sorry that was such a stupid question - the readout was just too cryptic for me to know where to start. I might make a request to check that the config file can be read without failing and if not a readable error returned.

Thanks for your help and your time.

from sops.

felixfontein avatar felixfontein commented on August 22, 2024

No worries! SOPS definitely shouldn't crash in that case. I've created #1506 which should fix that. It will tell you something like

The config file ../.sops.yaml does not contain any creation rule

from sops.

idlecodinggoats avatar idlecodinggoats commented on August 22, 2024

Haha, wow, perfect! Thanks. Just to note, my error wasn't missing creation_rules it was actually missing keys because I had keys instead. But at least with your pull request any future idiots like me will know to look in their config files first 😉

Thanks again. Your help is massively appreciated

from sops.

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.