Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit0d9db37

Browse files
KevinEdrycmoog
andauthored
fixed ssh key error to better reflect its state. (#139)
Fix config-ssh key file error to better reflect its stateCo-authored-by: Charles Moog <moogcharlie@gmail.com>
1 parenta878b98 commit0d9db37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎internal/cmd/configssh.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,12 @@ func configSSH(configpath *string, remove *bool) func(cmd *cobra.Command, _ []st
130130
}
131131
err=writeSSHKey(ctx,client,privateKeyFilepath)
132132
iferr!=nil {
133-
returnxerrors.Errorf("fetch and write ssh key: %w",err)
133+
fmt.Printf("Your private ssh key already exists at\"%s\"\nYou may need to remove the existing file and re-run this command\n",privateKeyFilepath)
134+
}else {
135+
fmt.Printf("Your private ssh key was written to\"%s\"\n",privateKeyFilepath)
134136
}
135137

136138
fmt.Printf("An auto-generated ssh config was written to\"%s\"\n",*configpath)
137-
fmt.Printf("Your private ssh key was written to\"%s\"\n",privateKeyFilepath)
138139
fmt.Println("You should now be able to ssh into your environment")
139140
fmt.Printf("For example, try running\n\n\t$ ssh coder.%s\n\n",envs[0].Name)
140141
returnnil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp