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
vilmibm
198c57a4c6
fix typo
2022-09-20 12:11:36 -07:00
vilmibm
8f3032af36
use Prompter in auth commands
2022-09-13 13:22:50 -07:00
Sam Coe
2fc0ffd0be
Fix auth refresh prompter initialization ( #6141 )
...
* Fix prompter not being initialized in auth refresh
* fix broken issue list test
2022-08-25 12:07:40 +03:00
Sam Coe
6955db471d
Set default value for all Select prompts ( #6131 )
2022-08-24 09:10:38 +03:00
Nate Smith
49adbe3fe6
Merge pull request #6079 from white-hat/6066-fix-git-protocol
...
fix protocol not being set when token is read from stdin
2022-08-15 16:54:59 -05:00
vilmibm
2d093c1741
add test helpers
2022-08-15 13:53:43 -05:00
Ilya Trushchenko
0a73192ace
fix protocol not being set when token is read from stdin
2022-08-15 14:12:19 -04:00
vilmibm
41385477c3
fix linting
2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115
Revert "update linter checks"
...
This reverts commit 40ecb8c188 .
2022-07-27 13:30:41 -05:00
vilmibm
e1238015f5
linter appeasement
2022-07-26 16:45:28 -05:00
vilmibm
f7d5c5f725
move prompter to own package
2022-07-26 16:41:13 -05:00
vilmibm
40ecb8c188
update linter checks
2022-07-26 16:06:52 -05:00
vilmibm
4afb567d06
WIP: survey wrapper
2022-07-26 14:39:38 -05:00
Sam Coe
cacff4ad6d
Use go-gh config package ( #5771 )
2022-06-23 11:50:04 +00:00
Sam Coe
074ed50b8a
Integrate go-gh API package ( #5614 )
2022-06-23 04:05:31 +01:00
Caleb Brose
83153fe9e5
Cleanups from PR comments
2022-06-14 14:33:41 +00:00
Caleb Brose
919dcebc45
Rename Context
2022-06-13 19:16:16 +00:00
Caleb Brose
b5580f9503
Refactor inferfaces from PR comments
2022-06-13 19:04:29 +00:00
cmbrose
9095556372
Merge remote-tracking branch 'upstream/trunk' into jungaretti/no-ssh-keys
2022-06-07 12:07:03 -05:00
cmbrose
60032db5eb
Use function options pattern
2022-06-07 11:04:08 -05:00
Jonathan Fenwick
2abe1b3294
Remove auth logout confirmation prompt ( #5751 )
2022-06-07 15:26:53 +00:00
cmbrose
2209a84c9d
More cleanup
2022-06-03 14:07:41 -05:00
cmbrose
f67ca53c07
Refactor ssh_keys to a more common location
2022-06-03 13:39:52 -05:00
JP Ungaretti
a1629c70c0
Generate codespaces key
2022-05-31 17:19:16 -07:00
Andrew Senetar
ff8aa8a555
Add ability to set title for ssh key in auth login ( #5524 )
2022-05-23 08:06:42 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
Naïm Favier
8dbd07212c
Stop auth commands from modifying global config file ( #5378 )
2022-04-11 17:26:18 +02:00
Mislav Marohnić
57d0581504
Add note about git auth
2022-02-21 15:24:54 +01:00
Mislav Marohnić
9cbfe73140
Have core commands have consistent Short description
2022-02-18 18:39:30 +01:00
Mislav Marohnić
0f956c8502
auth login: clarify authentication alternatives
2022-02-18 18:39:30 +01:00
Jonathan Mayer
1eefda0b45
gh auth login: add git protocol flag ( #5158 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 19:35:59 +00:00
Mislav Marohnić
6701b526d1
Fix authenticating git operations after auth login --with-token
...
After completing the interactive `gh auth login` flow, the `hosts.yml`
config file will have been populated with both `oauth_token` and `user`
properties for the GitHub host. However, after `auth login --with-token`
only the `oauth_token` is persisted but no username.
This fixes `auth git-credential` behavior so it allows authentication
even if the `user` property is missing. It's entirely optional to send a
proper username for git authentication, since GitHub seems to ignore the
actual value sent and just focuses on the token itself.
2022-02-09 00:10:10 +01:00
Kevin Lee
0d143ca89c
Consistent punctuation in command usages ( #5139 )
...
* Fix spelling and grammatical errors in command docs
* Add periods for consistency across the long command descriptions
* Format imports
2022-01-31 10:56:12 +00:00
Nate Smith
4b415f80d7
Merge pull request #5022 from cli/config-defaults
...
add GetOrDefault and related methods to Config
2022-01-17 10:44:28 -06:00