Skip to content

"Unable to extract public key from private key" for ed25519 & libgit2 #399

@squaremo

Description

@squaremo

While trying to reproduce fluxcd/image-automation-controller#186, I found that source-controller also seems not to be able to use ed25519 keys.

Steps to reproduce:

  1. install flux in a cluster (a vanilla bootstrap or install will do)
  2. create an ed25519 git secret (any repository URL you own (including one created by bootstrap) will do):
flux create secret git --ssh-key-algorithm=ed25519  --url=ssh://[email protected]/squaremo/flux-example edie
  1. create a git source that uses the secret and specifies libgit2:
flux create source git flux-eg --url ssh://[email protected]/squaremo/flux-example --secret-ref=edie --branch=main --git-implementation=libgit2

You may want to install the deploy key at the repo, but I don't think it's necessary to do so to reproduce the problem.

In the GitRepository status I see this message --

unable to clone 'ssh://[email protected]/squaremo/flux-example', error: Failed to authenticate SSH session: Unable to extract public key from private key

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/gitGit related issues and pull requestsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions