1019 B
1019 B
User SSH Key Shortcuts
Summary
Adds account-level SSH public key management shortcuts under the existing user command group.
Commands
gitlink-cli user +keys
gitlink-cli user +add-key --title laptop --key "ssh-ed25519 AAAA..."
gitlink-cli user +add-key --title laptop --from ~/.ssh/id_ed25519.pub
gitlink-cli user +add-key --from ~/.ssh/id_rsa.pub
gitlink-cli user +delete-key --id 123
Behavior
user +keyscallsGET /public_keyswith--pageand--limit.user +add-keycallsPOST /public_keyswithtitleandkey.user +delete-keycallsDELETE /public_keys/{id}.user +add-keyaccepts either inline key content or a public key file path.user +add-key --fromcan infer the default title from the public key filename.- Key content and key IDs are validated before a write/delete request is sent.
Tests
- Unit tests cover list pagination, inline key creation, file-based key creation, invalid key sources, delete path construction, and invalid key IDs.