Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 2b4a6c9

Browse files
authored
Merge pull request #342 from secrethub/feature/refer-to-web-signup
2 parents 6c3a6bb + 22c2756 commit 2b4a6c9

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

internals/secrethub/app.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ func NewApp() *App {
7979
io := ui.NewUserIO()
8080
store := NewCredentialConfig(io)
8181
help := "The SecretHub command-line interface is a unified tool to manage your infrastructure secrets with SecretHub.\n\n" +
82+
"If you do not yet have a SecretHub account, go here to create one:\n\n" +
83+
" https://signup.secrethub.io/\n\n" +
8284
"For a step-by-step introduction, check out:\n\n" +
8385
" https://secrethub.io/docs/getting-started/\n\n" +
8486
"To get help, see:\n\n" +

internals/secrethub/credential_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
// Errors
1313
var (
14-
ErrCredentialNotExist = errMain.Code("credential_not_exist").Error("could not find credential file. Run `secrethub signup` to create an account.")
14+
ErrCredentialNotExist = errMain.Code("credential_not_exist").Error("could not find credential file. Go to https://signup.secrethub.io/ to create an account or run `secrethub init` to use an already existing account on this machine.")
1515
)
1616

1717
// CredentialConfig handles the configuration necessary for local credentials.

internals/secrethub/init.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,18 @@ func (cmd *InitCommand) Run() error {
9595
}
9696
option, err := ui.Choose(cmd.io, "How do you want to initialize your SecretHub account on this device?",
9797
[]string{
98-
"Signup for a new account",
98+
"Sign up for a new account",
9999
"Use a backup code to recover an existing account",
100100
}, 3)
101101
if err != nil {
102102
return err
103103
}
104+
fmt.Fprintln(cmd.io.Output())
104105

105106
switch option {
106107
case 0:
107-
mode = InitModeSignup
108+
fmt.Fprintln(cmd.io.Output(), "Go to https://signup.secrethub.io/ and follow the steps to create an account and get it set up on this machine.")
109+
return nil
108110
case 1:
109111
mode = InitModeBackupCode
110112
}

internals/secrethub/signup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func NewSignUpCommand(io ui.IO, newClient newClientFunc, credentialStore Credent
5252

5353
// Register registers the command, arguments and flags on the provided Registerer.
5454
func (cmd *SignUpCommand) Register(r command.Registerer) {
55-
clause := r.Command("signup", "Create a free personal developer account.")
55+
clause := r.Command("signup", "Create a free personal developer account.").Hidden()
5656
clause.Flag("username", "The username you would like to use on SecretHub.").StringVar(&cmd.username)
5757
clause.Flag("full-name", "Your full name.").StringVar(&cmd.fullName)
5858
clause.Flag("email", "Your (work) email address we will use for all correspondence.").StringVar(&cmd.email)

0 commit comments

Comments
 (0)