forked from mislav/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]: mislav#2655 (comment)
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Feature: OAuth authentication | |
When I type "mislav" | ||
And I type "kitty" | ||
Then the output should contain "github.com username:" | ||
And the output should contain "github.com password for mislav (never stored):" | ||
And the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):" | ||
And the exit status should be 0 | ||
And the file "~/.config/hub" should contain "user: MiSlAv" | ||
And the file "~/.config/hub" should contain "oauth_token: OTOKEN" | ||
|
@@ -159,7 +159,7 @@ Feature: OAuth authentication | |
Given $GITHUB_USER is "mislav" | ||
And $GITHUB_PASSWORD is "kitty" | ||
When I successfully run `hub create` | ||
Then the output should not contain "github.com password for mislav" | ||
Then the output should not contain "github.com access token with scope 'repo' for mislav" | ||
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN" | ||
|
||
Scenario: XDG: legacy config found, credentials from GITHUB_USER & GITHUB_PASSWORD | ||
|
@@ -371,7 +371,7 @@ Feature: OAuth authentication | |
When I type "mislav" | ||
And I type "kitty" | ||
And I type "112233" | ||
Then the output should contain "github.com password for mislav (never stored):" | ||
Then the output should contain "github.com access token with scope 'repo' for mislav (generate one at https://github.com/settings/tokens):" | ||
Then the output should contain "two-factor authentication code:" | ||
And the output should not contain "warning: invalid two-factor code" | ||
And the exit status should be 0 | ||
|
@@ -429,7 +429,7 @@ Feature: OAuth authentication | |
When I run `hub create` interactively | ||
When I type "[email protected]" | ||
And I type "my pass@phrase ok?" | ||
Then the output should contain "github.com password for [email protected] (never stored):" | ||
Then the output should contain "github.com access token with scope 'repo' for [email protected] (generate one at https://github.com/settings/tokens):" | ||
And the exit status should be 0 | ||
And the file "../home/.config/hub" should contain "user: mislav" | ||
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN" | ||
|
@@ -457,7 +457,7 @@ Feature: OAuth authentication | |
When I run `hub fork` interactively | ||
And I type "mislav" | ||
And I type "kitty" | ||
Then the output should contain "git.my.org password for mislav (never stored):" | ||
Then the output should contain "git.my.org access token with scope 'repo' for mislav (generate one at https://git.my.org/settings/tokens):" | ||
And the exit status should be 0 | ||
And the file "../home/.config/hub" should contain "git.my.org" | ||
And the file "../home/.config/hub" should contain "user: mislav" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters