How to fix: Permission denied (publickey) on Windows 11, when using git clone and id_rsa private key


When using git clone with git 2.34.1 on Windows 11, I was getting the error:

Permission denied (publickey).

Cause: rsa is deprecated
The SSH public private keys were generated by using the command:
ssh-keygen -t rsa

After regenerating the keys with the command:
ssh-keygen -t ed25519

And adding the content of C:\Users\User.ssh\ to bitbucket as SSH key.
De connection problems were resolved.