Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg-agent socket doesn’t work early in the user login #12

Open
Profpatsch opened this issue Nov 29, 2016 · 0 comments
Open

gpg-agent socket doesn’t work early in the user login #12

Profpatsch opened this issue Nov 29, 2016 · 0 comments

Comments

@Profpatsch
Copy link
Member

I’ve got a user startup timer like so:

      (lib.mkIf config.vuizvui.programs.gnupg.enable {
        services.unlock-password-store = {
          description = "unlock the user password store";
          wantedBy = [ "default.target" ];
          # make sure gpg-agent is running
          wants = [ "gpg-agent.service" ];
          after = [ "gpg-agent.service" ];
          serviceConfig = {
            # use special unlock key in the password store (needs to exist of course)
            ExecStart = "${lib.getBin pkgs.pass}/bin/pass misc/unlock";
            StandardOutput = "null";
          };
        };
        timers.unlock-password-store = {
          description = "unlock password store on system start";
          wantedBy = [ "timers.target" ];
          timerConfig.OnStartupSec = "5s";
        };
       })

and when I log in the following errors are logged:

Nov 29 15:04:00 katara gpg-agent[1123]: gpg-agent[1123]: failed to unprotect the secret key: No such file or directory
Nov 29 15:04:00 katara gpg-agent[1123]: gpg-agent[1123]: failed to read the secret key
Nov 29 15:04:00 katara gpg-agent[1123]: gpg-agent[1123]: command 'PKDECRYPT' failed: No such file or directory <Pinentry>
Nov 29 15:04:00 katara systemd[1118]: unlock-password-store.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 29 15:04:00 katara systemd[1118]: unlock-password-store.service: Unit entered failed state.
Nov 29 15:04:00 katara systemd[1118]: unlock-password-store.service: Failed with result 'exit-code'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant