Skip to content

Commit 3deab0c

Browse files
kbailey4444samcoe
andauthored
UX and verbiage changes
Co-authored-by: Sam Coe <[email protected]>
1 parent 515fa97 commit 3deab0c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎pkg/cmd/auth/login/login.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
5858
Authenticate with a GitHub host.
5959
6060
The default authentication mode is a web-based browser flow. After completion, an
61-
authentication token will be stored internally.
62-
If a credential store is not found or there is an issue using it we will fallback to writing the token in plain text.
61+
authentication token will be stored securely in the system credential store.
62+
If a credential store is not found or there is an issue using it gh will fallback to writing the token to a plain text file.
6363
See %[1]sgh auth status%[1]s for its stored location.
6464
6565
Alternatively, use %[1]s--with-token%[1]s to pass in a token on standard input.
@@ -174,7 +174,7 @@ func loginRun(opts *LoginOptions) error {
174174
return fmt.Errorf("error validating token: %w", err)
175175
}
176176
// Adding a user key ensures that a nonempty host section gets written to the config file.
177-
_, err1 := authCfg.Login(hostname, "x-access-token", opts.Token, opts.GitProtocol, !opts.InsecureStorage)
177+
_, loginErr := authCfg.Login(hostname, "x-access-token", opts.Token, opts.GitProtocol, !opts.InsecureStorage)
178178
return err1
179179
}
180180

‎pkg/cmd/auth/refresh/refresh.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewCmdRefresh(f *cmdutil.Factory, runF func(*RefreshOptions) error) *cobra.
4848
if err != nil {
4949
return err
5050
}
51-
_, err1 := authCfg.Login(hostname, username, token, "", secureStorage)
51+
_, loginErr := authCfg.Login(hostname, username, token, "", secureStorage)
5252
return err1
5353
},
5454
HttpClient: &http.Client{},

‎pkg/cmd/auth/shared/login_flow.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func Login(opts *LoginOptions) error {
193193
return err
194194
}
195195
if insecureStorageUsed {
196-
fmt.Fprintf(opts.IO.ErrOut, "The authentication credentials were written in plain text.\n")
196+
fmt.Fprintf(opts.IO.ErrOut, "%s Authentication credentials saved in plain text", cs.Yellow("!"))
197197
}
198198

199199
if credentialFlow.ShouldSetup() {

0 commit comments

Comments
 (0)