innobead / huber

Huber 📦, Package Install Manager for GitHub repos
Apache License 2.0
185 stars 16 forks source link

Support for another SSH key type besides `id_rsa` #140

Open ii64 opened 5 months ago

ii64 commented 5 months ago

Is your feature request related to a problem? Please describe

When trying to use huber for either install or search a package it yields an error message:

huber search k3s error: authentication required but no callback set; class=Ssh (23); code=Auth (-16)%

After looking at the code for a glance, it seems that the support for SSH key appear only supported RSA key which is denoted by concatenation of path with id_rsa at:

https://github.com/innobead/huber/blob/9850d0265de8dab42bf5de19a29a4d576c7b597c/crates/app/src/component/github.rs#L91

For somebody that does not using RSA for SSH keys, this can lead to the aforementioned issue. For example, I am now, on my current computer only has id_ed25519 and id_ecdsa_sk.

Describe the solution you'd like

What I was thinking for this is that if we could make of use running SSH agent to authenticate the git operations as the agent always carried on the ENVs:

env | grep AGENT SSH_AGENT_PID=37358

Describe alternatives you've considered

I guess by continuing the previous approach but now we are doing some sort of scanning on known SSH key file name list.

Additional context

No additional context as of now.