Description of problem: The update from gnupg2-2.3.4-2.fc36.x86_64 to gnupg2-2.3.7-3.fc36.x86_64 broke my SSH setup with gpg-agent as ssh-agent. I have multiple SSH keys registered with gpg-agent. The preferred key is my GPG key on my YubiKey. The others are backups in local encrypted files. With the update the keys are returned in wrong order. SSH now prefers one of my backup keys. Version-Release number of selected component (if applicable): gnupg2-2.3.7-3.fc36.x86_64 How reproducible: always Steps to Reproduce: 1. configure gpg-agent to act as ssh-agent provider (add enable-ssh-support to ~/.gnupg/gpg-agent.conf and restart agent) 2. add multiple keys to gpg-agent 3. reorder keys in ~/.gnupg/sshcontrol 4. SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh ssh-add -l Actual results: ssh-add -l does not list the keys in the order they are specified in ~/.gnupg/sshcontrol instead they seem to be ordered alphanumerical by keygrip fingerprint. Expected results: keys are listed in the order they are configured in ~/.gnupg/sshcontrol Additional info: A downgrade to 2.3.4-2 and restart of gpg-agent restores the expected behavior.
This looks like a fallout from https://dev.gnupg.org/T5996. It was a significant change and from top of my head I do not see a simple way back so let me report the issue upstream: https://dev.gnupg.org/T6212 The only suggestion I have for you now would be to use `IdentitiesOnly` option of SSH to properly assign identities to servers and not depend on the agent returning the keys in particular order.
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
I can reproduce the issue on Fedora 37 with gnupg2-2.3.8-1.fc37.
This was fixed with 2.4.1 which is in rawhide for some time. Closing as I do not plan to backport this fix unless there will be huge demand.