William Martin
3ed389d664
Disable telemetry for GHES
2026-04-17 11:50:24 +02:00
Babak K. Shandiz
5685b9a443
refactor(auth refresh): use PlainHttpClient instead of zero http.Client
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:51:13 +01:00
Andrey
4e1318eb2a
feat: gh auth Automatically copy one-time OAuth code to clipboard ( #11518 )
...
* feat: add ability to copy one-time OAuth code while authenticating
Signed-off-by: Andrey <andrekabatareika@gmail.com>
* fix(docs): wrong example for gh auth refresh
* chore(authflow): update message to include one-time code to it
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
* chore(authflow): improve message when copied one-time code
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
* chore(authflow): don't early return error when could not copy OAuth code
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
* refactor(authflow): make code for working with OAuth code more readable
* Adjust language in `gh auth` help for clipboard
---------
Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-25 09:52:51 -06:00
Azeem Sajid
33c30d5bd1
Inconsistent format of examples in help text
2025-02-27 16:26:25 +05:00
Andy Feller
4f32282f93
Update gh auth commands to point to GitHub Docs
...
After initial discussion with core maintainers, it didn't seem prudent to duplicate the GitHub Docs information on OAuth scopes within the GitHub CLI codebase.
Instead, this commit updates help usage information in relevant commands on the page within GitHub Docs for more information.
2024-12-12 11:03:57 -05:00
ANKDDEV
24db9f64c7
docs: add mention of scopes help topic in auth refresh command help
2024-12-06 17:06:19 +03:00
William Martin
bd4ba5c39a
Make gitcredential helper smarter
2024-05-16 13:15:26 +02:00
William Martin
af589aa2f3
Move fetching configured helper into gitcredentials
2024-05-16 12:39:11 +02:00
William Martin
a3d65e0dce
Extract units for configuring and updating git credential helpers
2024-05-16 12:32:55 +02:00
William Martin
07e0ff7127
Fix repo fork to use remote protocol if none configured
2024-05-10 10:48:36 +02:00
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
Josh Soref
6ff355049c
Improve discovery of gh auth status
2024-03-18 12:09:27 -04:00
William Martin
0763c1d4a7
Locally prevent mixup of username and token in refresh
2023-12-07 11:43:05 +01:00
William Martin
16cfe5f21a
Fix token username return ordering in auth refresh
2023-12-07 11:35:02 +01:00
Sam Coe
fd7dc25e2a
Add error to auth refresh when active user does not match newly authenticated token user
2023-12-06 16:51:48 -04:00
Sam Coe
024cb939af
Rename authCfg.Token to authCfg.ActiveToken and authCfg.SetToken to authCfg.SetActiveToken
2023-12-06 14:06:28 +01:00
Sam Coe
1a3392a379
Rename authCfg.User to authCfg.ActiveUser
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
Yukai Chou
b14da6c63f
Wrap scopes
2023-11-23 07:22:57 +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
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
becccebae1
Refactor as per review
...
Co-authored-by: Shion Ichikawa <shion1305@gmail.com>
2023-06-25 01:30:09 +05:30
Nilesh Singh
0d9e0bc91a
Add remove/reset to auth refresh
2023-06-19 21:56:15 +05:30
nate smith
75dc9c0c22
extend secure storage default to auth refresh
2023-04-04 15:22:42 -07:00
Alex Petrov
76f6aa1fc1
Clarify gh auth refresh command behavior ( #7132 )
2023-03-13 02:08:32 +00:00
Sam Coe
b74ba55e3f
Make auth refresh more convenient with secure storage ( #7098 )
2023-03-08 10:19:42 +11: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
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
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
vilmibm
41385477c3
fix linting
2022-07-27 14:15:27 -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
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
nate smith
0a619d422a
undo overzealous find/replace
2022-01-14 15:27:05 -06:00
Mislav Marohnić
be9f01101a
Tweak auth flow re: interactivity
...
Fixes non-interactive login flow and make sure "prompt" configuration is
respected by never prompting if it was explicitly disabled.
No longer asks to press Enter again after "Authentication complete"
message, since that didn't provide any value to the user.
2022-01-12 15:50:51 +01:00
Nick Cooper
a408f24d3a
auth: add noninteractive flow to login/refresh
2022-01-11 22:44:46 +01:00
nate smith
562f1b3d0d
add GetOrDefault functionality to config
2022-01-11 14:56:58 -06:00
Alan Donovan
f4491c7a80
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 11:40:20 -04:00
Mislav Marohnić
89ad870190
auth refresh: preserve existing scopes when requesting new ones
...
When there was a previously valid token that was granted some scopes,
ensure all those scopes will be re-requested when doing the
authentication flow for the new token.
2021-10-14 19:52:59 +02:00
Mislav Marohnić
b38ce24497
Ensure correct path to gh after gh auth refresh git credential setup
2021-09-24 14:43:48 +02:00
Mislav Marohnić
d853ce5bc9
Avoid resolving executable() until requested at runtime
...
This is to avoid hitting the filesystem and resolving symlinks
unnecessarily. The value of executable is just used conditionally by a
handful of commands.
2021-09-24 14:42:41 +02:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00