I was getting the following error while setting up a new machine using an existing ssh key:
sign_and_send_pubkey: signing failed for ED25519 "/home/zntfdr/.ssh/id_ed25519" from agent: agent refused operation
The fact that the agent "refused operation" immediately told me that this was not a failure to my end in copying the ssh key but something else, it turns out that ssh requires certain file permissions to operate, fixed by running
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*