I installed NixOS on my Raspberry PI and it works fine.
I wanted to download my configurations from github.
So i installed git and gnupg since I have a gpg-key an some subkeys for authentication. The keys are present in my github account.
I tried “echo $SSH_AUTH_SOCK” which leads to no output.
Then I tried “ssh -vvv -T git@github.com”, which leads to Trying private key: /home/admin/.ssh/id_rsa
no such identity: /home/admin/.ssh/id_rsa: No such file or directory
gpgconf --list-dirs agent-ssh-socket → /run/user/1004/gnupg/S.gpg-agent.ssh
systemctl --user status gpg-agent-ssh.socket → active(running)
systemctl --user status gpg-agent.service → active(running)
I have finally found the solution.
The configuration was correct, but I had overlooked/forgotten an essential step.
I had not written my gpg subkey for authentication in the ~/.gnupg/sshcontrol file.
gpg --expert --full-generate-key
-> 11 (ECC - set your own capabilities)
-> Current allowed actions: Certify
-> ... custom settings
create a subkey for authentication
gpg --list-keys
gpg --expert --edit-key KEY-ID
gpg> addKey
-> 8 (RSA - set your own capabilites)
-> Current allowed actions: Authentication
-> ... custom settings
gpg --list-secret-keys --keyid-format LONG
-> One masterkey with setting [C] (Certify)
-> One subkey with setting [A] (authentication)