Commit graph

181 commits

Author SHA1 Message Date
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
Sam Coe
47b27cde4b
Handle erase operation in auth git-credential command (#6805) 2023-01-03 14:03:27 -08:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00
Mislav Marohnić
9ec2107cc6
Merge pull request #6421 from cli/go-gh-term
Dogfood term package from go-gh
2022-11-03 13:02:24 +01:00
Mislav Marohnić
ba028b9044 Fix setting up git credential helper on Windows 2022-11-02 15:53:26 +01:00
Josh Soref
6530c8fa1b Replace secrets.GITHUB_TOKEN with github.token 2022-11-01 10:59:17 -04:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
Sam Coe
2944f7c3ab
Create git client (#6354) 2022-10-14 07:47:03 +00:00
Nate Smith
4a2ca15350
Merge pull request #6324 from nsmag/auth-token
Add `gh auth token`
2022-10-04 14:56:21 -05:00
vilmibm
f7fa164792 tweak wording 2022-10-04 12:46:41 -07:00
Mislav Marohnić
acb61072cd Respect GH_HOST in auth login, repo delete
Bonus fix: respect fallback host argument to `FromFullNameWithHost()`
2022-09-26 13:32:54 +02:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests (#6333)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
Natthakit Susanthitanon
60d8cb085a Add gh auth token 2022-09-22 15:47:19 +07:00