[PF-1854] Alert user when there is no terra sshkey as they add a git repo reference#292
[PF-1854] Alert user when there is no terra sshkey as they add a git repo reference#292
Conversation
# Conflicts: # src/main/java/bio/terra/cli/serialization/userfacing/resource/UFDataCollection.java
| + "You must associate the new SSH public key with your GitHub account using " | ||
| + "https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent. " | ||
| + "Are you sure you want to proceed (y/N)?", | ||
| + "https://github.com/settings/keys. Are you sure you want to proceed (y/N)?", |
There was a problem hiding this comment.
Why did this change? I followed https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent when I set up my key
For me, it was helpful that cli printed https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent
There was a problem hiding this comment.
i thought it's more straightforward to just go to https://github.com/settings/keys to add your key? step 1 and 2 should be automatically covered by the notebook startup script.
There was a problem hiding this comment.
Oh, is adding a key to https://github.com/settings/keys the same as ssh-add -K ~/.ssh/id_ed25519 ? If so, SG, thanks
| throw new UserActionableException( | ||
| "You do not have a Terra ssh key, cloning the git repo in the GCP notebook will" | ||
| + " fail. Please run `terra user ssh-key generate` and store the output (public key) in" | ||
| + " your GitHub account https://github.com/settings/keys."); |
There was a problem hiding this comment.
| @DisplayName("list and describe reflect adding a new referenced git repo") | ||
| void listDescribeReflectAdd() throws IOException { | ||
| workspaceCreator.login(); | ||
| TestCommand.runCommandExpectSuccess("user", "ssh-key", "generate", "--quiet"); |
There was a problem hiding this comment.
// Generate ssh key to avoid prompt about ssh key
example user flow: