You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to [this comment][ref], the usage of a password is currently
broken but it is possible to pass an access token instead.
This access token is then stored in the configuration file, so adjust
the message to ask for an access token, tell the user where then can
generate a new one, provide the required scope, and do not tell that the
value is not stored.
[ref]: #2655 (comment)
Copy file name to clipboardExpand all lines: features/authentication.feature
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Feature: OAuth authentication
26
26
When I type "mislav"
27
27
And I type "kitty"
28
28
Then the output should contain "github.com username:"
29
-
And the output should contain "github.com password for mislav (never stored):"
29
+
And the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):"
30
30
And the exit status should be 0
31
31
And the file "~/.config/hub" should contain "user: MiSlAv"
32
32
And the file "~/.config/hub" should contain "oauth_token: OTOKEN"
@@ -159,7 +159,7 @@ Feature: OAuth authentication
159
159
Given $GITHUB_USER is "mislav"
160
160
And $GITHUB_PASSWORD is "kitty"
161
161
When I successfully run `hub create`
162
-
Then the output should not contain "github.com password for mislav"
162
+
Then the output should not contain "github.com access token with scope 'repo' for mislav"
163
163
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN"
164
164
165
165
Scenario: XDG: legacy config found, credentials from GITHUB_USER & GITHUB_PASSWORD
@@ -371,7 +371,7 @@ Feature: OAuth authentication
371
371
When I type "mislav"
372
372
And I type "kitty"
373
373
And I type "112233"
374
-
Then the output should contain "github.com password for mislav (never stored):"
374
+
Then the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):"
375
375
Then the output should contain "two-factor authentication code:"
376
376
And the output should not contain "warning: invalid two-factor code"
377
377
And the exit status should be 0
@@ -429,7 +429,7 @@ Feature: OAuth authentication
429
429
When I run `hub create` interactively
430
430
When I type "mislav@example.com"
431
431
And I type "my pass@phrase ok?"
432
-
Then the output should contain "github.com password for mislav@example.com (never stored):"
432
+
Then the output should contain "github.com access token with scope 'repo' for mislav@example.com (generate one at https://github.com/settings/tokens):"
433
433
And the exit status should be 0
434
434
And the file "../home/.config/hub" should contain "user: mislav"
435
435
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN"
@@ -457,7 +457,7 @@ Feature: OAuth authentication
457
457
When I run `hub fork` interactively
458
458
And I type "mislav"
459
459
And I type "kitty"
460
-
Then the output should contain "git.my.org password for mislav (never stored):"
460
+
Then the output should contain "git.my.org access token with scope 'repo' for mislav (generate one at https://git.my.org/settings/tokens):"
461
461
And the exit status should be 0
462
462
And the file "../home/.config/hub" should contain "git.my.org"
463
463
And the file "../home/.config/hub" should contain "user: mislav"
0 commit comments