Skip to content

cred_from_ssh_config doesn't handle encrypted keys properly #55

@dionb

Description

@dionb

Hi, Thanks for the great library :)

I'm using a password protected ssh key, with no particular config around it, and I'm never getting prompted for my password. This appears to be because git2 does not try to decrypt the key when creating the Cred object, only when consuming it.

My current workaround is to remove the call to Cred::ssh_key on line 209. But of course this is not desireable for other users of my tool that don't have encrypted keys.

I would like to help implement a fix for this. The only approach I can think of would require remembering that the specific key had been tried before, and skipping the passwordless attempt the second time. Does that sound like a reasonable approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions