$ git push
Everything up-to-date
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This happens after upgrading to 16.09. Have to read the changelog probably to fix this ^^.
trace: warning: The option definition `services.xserver.startGnuPGAgent' in `/etc/nixos/configuration.nix' no longer has any effect; please remove it.
See the 16.03 release notes for more information.
Three things:
$ pkill gpg-agent solved the problem.
5391882ebd781149e213e8817fba6ac3c503740c provides some documentation.
Most helpful comment
$ pkill gpg-agentsolved the problem.