feat: Add ssh-keys command and --ssh-key-id to pods create#313
Open
feat: Add ssh-keys command and --ssh-key-id to pods create#313
Conversation
- Add `prime ssh-keys list` command to list SSH keys with IDs - Add `prime ssh-keys create` command to create new SSH keys - Add `prime ssh-keys delete` command to delete SSH keys - Add `prime ssh-keys set-primary` command to set primary key - Add `--ssh-key-id` option to `prime pods create` Users can now get SSH key IDs via CLI and use them when creating pods.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| if not key_content: | ||
| console.print("[red]Error: Must provide either --public-key or --file[/red]") | ||
| raise typer.Exit(1) |
There was a problem hiding this comment.
File overrides valid public key when empty
Low Severity
When both --public-key and --file arguments are provided to ssh-keys create, the file content unconditionally overwrites the key_content variable even if the file is empty. If the user provides a valid --public-key value but also specifies a --file that happens to be empty, their valid public key is silently discarded. The subsequent error message "Must provide either --public-key or --file" is misleading since the user did provide a valid --public-key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prime ssh-keys listto display SSH keys with IDsprime ssh-keys createfor adding keys from file or stringprime ssh-keys deleteandset-primarycommands--ssh-key-idoption toprime pods createUsers can now manage SSH keys entirely via CLI.
Note
Introduces SSH key management in the CLI and enables selecting an SSH key during pod creation.
SSHKeysClientwith models (SSHKey,SSHKeyList,SSHKeyCreateRequest) tolist,create,delete, andset_primarySSH keys (prime_cli/api/ssh_keys.py)prime ssh-keyscommand group:list(table/json),create(from file or string),delete,set-primary(prime_cli/commands/ssh_keys.py), and wired into the main CLI (main.py)prime pods createadds--ssh-key-idand includessshKeyIdin the pod request payload (commands/pods.py)Written by Cursor Bugbot for commit e0e29b2. This will update automatically on new commits. Configure here.