Ed25519 private SSH key with passphrase throws "PassPhraseMissingError"

1. What version of Go are you using ( go version )?

go1.16.2

2. What operating system and processor architecture are you using?

windows/amd64

3. What did you do?

Run go-git-clone.go once with a passphrase protected key generated by
ssh-keygen -t rsa -b 3072
and secondly with a passphrase protected key generated by
ssh-keygen -t ed25519
each with
git_clone_go.exe <git server> <local dir> <path to keyfile> <password>

ssh-keygen version from: C:\WINDOWS\System32\OpenSSH\ssh-keygen.exe, version 7.6.0.0

The RSA key was correctly decrypted and used.
The ed25519 key throws:
generate publickeys failed: ssh: this private key is passphrase protected

4. What did you expect to see?

Using the ed25519 key with passphrase should be possible as it is with the RSA key.

5. What did you see instead?

Output:
generate publickeys failed: ssh: this private key is passphrase protected

The part of the output message ssh: this private key is passphrase protected had been generated by the “PassPhraseMissingError” message in golang.org/x/crypto/ssh/keys.go func unencryptedOpenSSHKey.
func ParseRawPrivateKey took case "OPENSSH PRIVATE KEY": path.

go-git-clone.gocan be found under:
https://github.com/go-git/go-git/blob/master/_examples/clone/auth/basic/access_token/main.go

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.