Tyler McGoffin
46790977bb
Add documentation explaining how to use hostname for gh auth login
2024-09-19 15:25:23 -07:00
Tyler McGoffin
5dd5246307
Replace "GitHub Enterprise Server" with "other" in gh auth login prompt
...
This change is meant to better support the login flow for other customers
besides GitHub Enterprise Server customers that use the same login flow
as GHES.
2024-09-19 15:25:23 -07:00
William Martin
3ea937d903
Inject GitCredentialFlow to LoginFlow as test seam
2024-05-17 13:26:23 +02:00
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
Babak K. Shandiz
2c6343ad56
Explain --skip-ssh-key usage in long doc
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-13 15:47:44 +01:00
Babak K. Shandiz
cf9699bbbb
Add --skip-ssh-key to options
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-06 12:46:05 +01:00
William Martin
b281269052
Fix affect effect typo in login cmd
2023-12-07 15:03:26 +01:00
William Martin
08c659bdf8
Document that git protocol during login is host level
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
1bf6023164
Display message when logging into existing account
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
William Martin
9efa7248a9
Initial multi-account migration work
2023-12-06 14:06:28 +01: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
Keith Bailey
97755c6bf0
Document when gh auth login writes oauth token to plain text ( #7781 )
2023-09-18 11:34:13 +02:00
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
5d56dfbf42
add --insecure-storage and make secure storage the default
2023-04-04 11:13:43 -07: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
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
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
vilmibm
8f3032af36
use Prompter in auth commands
2022-09-13 13:22:50 -07: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
Ilya Trushchenko
0a73192ace
fix protocol not being set when token is read from stdin
2022-08-15 14:12:19 -04:00
vilmibm
f7d5c5f725
move prompter to own package
2022-07-26 16:41:13 -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
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ć
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ć
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
Alan Donovan
f4491c7a80
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 11:40:20 -04: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
Mislav Marohnić
98f1f5ec0d
Use absolute path when configuring gh as git credential
...
This keeps git operations working even when PATH is modified, e.g. `brew
update` will work even though Homebrew runs the command explicitly
without `/usr/local/bin` in PATH.
Additionally, this inserts a blank value for `credential.*.helper` to
instruct git to ignore previously configured credential helpers, i.e.
those that might have been set up in system configuration files. We do
this because otherwise, git will store the credential obtained from gh
in every other credential helper in the chain, which we want to avoid.
Before:
git config --global credential.https://github.com.helper '!gh auth git-credential'
After:
git config --global credential.https://github.com.helper ''
git config --global --add credential.https://github.com.helper '!/path/to/gh auth git-credential'
2021-03-03 16:20:21 +01:00
Mislav Marohnić
5a110c8e42
Add SSH key generation & uploading to gh auth login flow
2021-02-01 23:34:00 +01:00
Mislav Marohnić
c9407b2629
More descriptive error when aborting auth due to environment variables
...
Old message:
read-only token in GH_TOKEN cannot be modified
This message was vague and some users did not understand that this
refers to the value that is read from environment variables.
New message:
$ GH_TOKEN=123 ghd auth login -h github.com
The value of the GH_TOKEN environment variable is being used for authentication.
To have GitHub CLI store credentials instead, first clear the value from the environment.
2021-01-20 18:27:35 +01:00
Mislav Marohnić
381e83e6e5
Extend git credential prompt to auth refresh
2020-12-07 20:01:16 +01:00
Mislav Marohnić
c39dc28fa1
Rename auth/client to auth/shared
2020-12-07 17:08:42 +01:00
Mislav Marohnić
d56d92c908
If git credential helper is non-defined, set gh as credential helper
2020-11-23 20:20:05 +01:00
Mislav Marohnić
91d2adc134
Avoid re-requesting username if we already have it
2020-11-20 19:36:26 +01:00
Mislav Marohnić
67672fa88c
Prime user's git HTTPS credentials on auth login
2020-11-20 19:36:04 +01:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00