Repository navigation
Add the SSH key under a free name when the name is taken (fixes HTTP 409) - #64
Merged
Merged
Conversation
… the name A Shadeform or Lambda account that already had a different key called "labagent" answered HTTP 409, ssh-key-add failed, and a launch then could not find our key by its fingerprint. The key is now added as labagent-<fingerprint start> when the name is taken. A key already there is still found by fingerprint first and never added twice. Created by LabAgent https://becloudready.com/ Co-Authored-By: LabAgent <info@becloudready.com>
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.
Seen on a second laptop:
ssh-key-add --cloud allfailed on Shadeform withHTTP 409: There is already an SSH Key with name [labagent]. The account held a different key under that name, so ours was never added and the launch could not find it by fingerprint.add_ssh_key(Shadeform and Lambda) now checks the account's key names first and, if the name is taken by another key, adds ours aslabagent-<first 8 characters of the fingerprint>. A key already in the account is still found by fingerprint before anything is added, so reruns add nothing twice. Launches use the fingerprint, so the name does not matter to them.Verified: new test with a fake Shadeform (stale
labagentkey, ours added under a new name, second call adds nothing); full suite passes except the known Nebius-login test. Not verified against the real Shadeform API, and Nebius and RunPod key names were not touched (not checked whether they hit the same conflict).Created by LabAgent