Commit graph

195 commits

Author SHA1 Message Date
William Martin
08c7bd1df2 Use real config and login in status tests 2023-12-06 14:06:28 +01:00
Sam Coe
eca5f72328 UX polish and standardization of language 2023-12-06 14:06:28 +01:00
William Martin
98381e63c9 Refactor switch test to be more structural 2023-12-06 14:06:28 +01:00
William Martin
7667fbdb5a Handle logout having no candidates 2023-12-06 14:06:28 +01:00
William Martin
df274d4f3a Implement auth switch 2023-12-06 14:06:28 +01:00
Sam Coe
2fc6dbd851 Add user flag to auth logout command 2023-12-06 14:06:28 +01:00
William Martin
72d5550407 Implemented auth logout for multiaccount 2023-12-06 14:06:28 +01:00
William Martin
1bf6023164 Display message when logging into existing account 2023-12-06 14:06:28 +01:00
William Martin
a9acece7dd Split Login into adding a user and switching
It makes clear the steps that should be needed to "switch" which should be
shared between Login (add user and switch to it), Logout (remove user and switch
to another), and Switch (no modification and switch to a user)
2023-12-06 14:06:28 +01:00
William Martin
c4fcf9ba1a Add test to ensure login command allows multiple users 2023-12-06 14:06:28 +01:00
Sam Coe
38b73e3f85 Set host level git_protocol on login 2023-12-06 14:06:28 +01:00
Sam Coe
68e30beac4 Logout removes token from keyring using username 2023-12-06 14:06:28 +01:00
Sam Coe
d8084f5f6d Hide all keyring package implementation inside internal keyring package 2023-12-06 14:06:28 +01:00
William Martin
9efa7248a9 Initial multi-account migration work 2023-12-06 14:06:28 +01:00
Andy Feller
c7c74dd422
Merge pull request #8342 from muzimuzhi/docs/unify-markup
Unify doc mark-ups
2023-12-01 09:31:36 -05:00
Mika
2f31607096
Add timeout error in gh auth status (#8337) 2023-11-29 08:54:55 +00:00
Yukai Chou
f4955bd47b Add missing minimum required scope gist 2023-11-23 07:23:54 +08:00
Yukai Chou
b14da6c63f Wrap scopes 2023-11-23 07:22:57 +08:00
Yukai Chou
ba585149c3 Leftovers 2023-11-23 07:12:47 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Sam Coe
7924878315
Fix git protocol and refactor Config interface (#8246) 2023-10-27 15:42:05 +02:00
William Martin
7d8c1af009 Fix GitProtocol signature and rework test descriptions 2023-10-19 12:49:38 +02:00
Keith Bailey
97755c6bf0
Document when gh auth login writes oauth token to plain text (#7781) 2023-09-18 11:34:13 +02:00
Kousik Mitra
6fc6b87484
Reword token invalid message (#7906) 2023-08-28 15:12:28 -05:00
Jamie Tanna
e4cddb562e
Remove GHE handling for workflow scope (#7841)
According to [0] we appear to no longer support GHE 2.x, as the latest
release was deprecated in early 2022.

We can therefore remove this custom handling.

[0]: https://docs.github.com/en/enterprise-server@3.7/admin/all-releases
2023-08-15 17:40:09 +00:00
Sam Coe
5e2e818204
Small tweaks to auth refresh remove-scopes and reset-scopes flags (#7631) 2023-06-27 16:33:52 +09:00
Nilesh Singh
0ddf32d589 Add cli test to remove multiple scopes at once 2023-06-26 23:52:55 +05:30
Nilesh Singh
becccebae1 Refactor as per review
Co-authored-by: Shion Ichikawa <shion1305@gmail.com>
2023-06-25 01:30:09 +05:30
Nilesh Singh
2a436cde3d
Merge branch 'trunk' into n1lesh-remove-scope 2023-06-25 00:03:12 +05:30
Nilesh Singh
0d9e0bc91a Add remove/reset to auth refresh 2023-06-19 21:56:15 +05:30
rajhawaldar
b8302311fa
Added wantErrOut property 2023-06-15 09:08:06 +05:30
rajhawaldar
437b78a955 Resolve tests/lint errors 2023-06-07 09:21:50 +05:30
rajhawaldar
69c02b9b8a update gh auth status to write to stdout on success 2023-06-06 23:30:16 +05:30
Lại Tuấn Anh
3d8057d856
fix: normalize hostname for auth login (#6999)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-17 13:35:30 +00:00
Sam Coe
dbc2f05124
Update go-gh to v2 (#7299)
* Update go-gh

* Update code for go-gh v2
2023-04-16 15:34:23 +10:00
nate smith
75dc9c0c22 extend secure storage default to auth refresh 2023-04-04 15:22:42 -07:00
nate smith
d9db81db4f fix apparent typo 2023-04-04 11:13:53 -07:00
nate smith
5d56dfbf42 add --insecure-storage and make secure storage the default 2023-04-04 11:13:43 -07:00
Kenichi Kocha
6261bc6971
Additional help doc and example for auth setup-git (#7243) 2023-04-04 01:36:09 +00:00
vaindil
7006d3f0a5 move SSH key errors out of upload function 2023-03-31 13:47:25 -04:00
vaindil
f21f1ca4ef check SSH key existence before uploading 2023-03-29 17:32:25 -04:00
Alex Petrov
76f6aa1fc1
Clarify gh auth refresh command behavior (#7132) 2023-03-13 02:08:32 +00:00
Sam Coe
50ddb369a6
Manually get current user name rather than use api client (#7114) 2023-03-09 11:50:12 +11:00
Sam Coe
b74ba55e3f
Make auth refresh more convenient with secure storage (#7098) 2023-03-08 10:19:42 +11:00
Sam Coe
4636931b02
Use default host for auth token command if a hostname is not provided (#7094) 2023-03-07 10:34:54 +11:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00
Sam Coe
df83dc2d58
Add ability to store tokens in encrypted storage (#7043) 2023-02-28 00:04:53 +00:00
Sam Coe
a33e12a21d
Refactor Config interface in preperation for encrypted token storage (#7033) 2023-02-28 10:51:12 +11:00
Ariel Deitcher
a5edd8f542
show token scopes on auth status (#6546)
- show path to config file
- display token prefix
- refine how missing scopes are shown

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-01-25 16:25:00 +01:00
Sam Coe
83d080488e
Use AuthToken function to retrieve AuthToken instead of GetOrDefault (#6878) 2023-01-18 11:00:45 -08:00