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, qnd 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
@@ -31,7 +31,7 @@ Feature: OAuth authentication
31
31
When I type "mislav"
32
32
And I type "kitty"
33
33
Then the output should contain "github.com username:"
34
-
And the output should contain "github.com password for mislav (never stored):"
34
+
And the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):"
35
35
And the exit status should be 0
36
36
And the file "~/.config/hub" should contain "user: MiSlAv"
37
37
And the file "~/.config/hub" should contain "oauth_token: OTOKEN"
@@ -168,7 +168,7 @@ Feature: OAuth authentication
168
168
Given $GITHUB_USER is "mislav"
169
169
And $GITHUB_PASSWORD is "kitty"
170
170
When I successfully run `hub create`
171
-
Then the output should not contain "github.com password for mislav"
171
+
Then the output should not contain "github.com access token with scope 'repo' for mislav"
172
172
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN"
173
173
174
174
Scenario: XDG: legacy config found, credentials from GITHUB_USER & GITHUB_PASSWORD
@@ -380,7 +380,7 @@ Feature: OAuth authentication
380
380
When I type "mislav"
381
381
And I type "kitty"
382
382
And I type "112233"
383
-
Then the output should contain "github.com password for mislav (never stored):"
383
+
Then the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):"
384
384
Then the output should contain "two-factor authentication code:"
385
385
And the output should not contain "warning: invalid two-factor code"
386
386
And the exit status should be 0
@@ -438,7 +438,7 @@ Feature: OAuth authentication
438
438
When I run `hub create` interactively
439
439
When I type "mislav@example.com"
440
440
And I type "my pass@phrase ok?"
441
-
Then the output should contain "github.com password for mislav@example.com (never stored):"
441
+
Then the output should contain "github.com access token with scope 'repo' for mislav@example.com (generate one at https://github.com/settings/tokens):"
442
442
And the exit status should be 0
443
443
And the file "../home/.config/hub" should contain "user: mislav"
444
444
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN"
@@ -466,7 +466,7 @@ Feature: OAuth authentication
466
466
When I run `hub fork` interactively
467
467
And I type "mislav"
468
468
And I type "kitty"
469
-
Then the output should contain "git.my.org password for mislav (never stored):"
469
+
Then the output should contain "git.my.org access token with scope 'repo' for mislav (generate one at https://git.my.org/settings/tokens):"
470
470
And the exit status should be 0
471
471
And the file "../home/.config/hub" should contain "git.my.org"
472
472
And the file "../home/.config/hub" should contain "user: mislav"
0 commit comments