Skip to content

Conversation

@TheFox0x7
Copy link
Contributor

@TheFox0x7 TheFox0x7 commented Mar 22, 2025

adds capabilities for gitea to generate ecdsa and ed25519 keys by default
adds cli for built-in ssh keygen

closes: #33783


Since we already generate RSA key in rootless by default, I see no reason to add keygen in there. Instead we can add more keygen capabilities to internal ssh server.
The only remaining question is how to expose this to end user?
One option I see is to extend ServerHostKeys to ["gitea.rsa","gitea.ecdsa","gitea.ed25519","gogs.rsa"] but I'm not sure if it's a correct way.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 22, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Mar 22, 2025
rework keygen to guess the keysize from extension
make key generation happen in generation module
@github-actions github-actions bot added the modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin label Mar 23, 2025
@TheFox0x7 TheFox0x7 marked this pull request as ready for review March 23, 2025 23:15
@TheFox0x7 TheFox0x7 force-pushed the generate-additional-ssh-keys branch from 0372c4b to 61f4962 Compare March 25, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add openssh-keygen to Dockerfile-rootless

4 participants