William Martin
c16836bcf7
Use tighter interface in setup-git
2024-05-16 13:39:42 +02: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
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
William Martin
5007c18f5f
Fix unused params across project
2024-05-07 17:50:43 +02:00
Raj Hawaldar
76ec5d5454
Add force flag to setup-git command ( #8552 )
...
Co-authored-by: William Martin <williammartin@github.com>
2024-01-18 13:28:37 +01:00
William Martin
15ba536317
Ensure subtests use the right t during setup
2023-12-06 14:06:28 +01:00
William Martin
0a7871c6d3
Use real config in setupgit cmd tests
2023-12-06 14:06:28 +01:00
William Martin
5b3e7290be
Use real config and env in login cmd 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
Yukai Chou
ba585149c3
Leftovers
2023-11-23 07:12:47 +08:00
Kenichi Kocha
6261bc6971
Additional help doc and example for auth setup-git ( #7243 )
2023-04-04 01:36:09 +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
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
Des Preston
94a640bd2a
Add auth setup-git for setting up gh as a git credential helper ( #4246 )
...
Adds a new command `gh auth setup-git [<hostname>]` that sets up git to
use the GitHub CLI as a credential helper.
The gist is that it runs these two git commands for each hostname the
user is authenticated with.
```
git config --global --replace-all 'credential.https://github.com.helper ' ''
git config --global --add 'credential.https://github.com.helper ' '!gh auth git-credential'
```
If a hostname flag is given, it'll setup GH CLI as a credential helper
for only that hostname.
If the user is not authenticated with any git hostnames, or the user is
not authenticated with the hostname given as a flag, it'll print an
error.
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-02 16:38:34 +00:00