moriturus / ktra

Your Little Cargo Registry
https://book.ktra.dev
Apache License 2.0
402 stars 38 forks source link

Add deployment dependency: openssh-client #64

Open HeroicKatora opened 11 months ago

HeroicKatora commented 11 months ago

This is necessary to utilize an ssh-key with the index repository. If no ssh is found, libgit never offers the SSH credential option¹ and the server fails with:

no supported credential type

This enables dockerized deployments with an ssh key, such as Github's Deploy keys.

This change add ~10MB to the container's final size (130MB to 139MB).

¹Specifically, the function in RemoteCallbacks::credentials is called with a parameter denoting the set permissible authenticators. When no ssh is found the bit for CredentialType::SSH_KEY is disabled. Then subsequently ktra does not check for the ssh key parameter, here.