Commit graph

15 commits

Author SHA1 Message Date
William Martin
18dc5e77f0 Add sampled command telemetry 2026-04-16 21:42:46 +02:00
William Martin
df274d4f3a Implement auth switch 2023-12-06 14:06:28 +01:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00
Natthakit Susanthitanon
60d8cb085a Add gh auth token 2022-09-22 15:47:19 +07: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
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
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
d56d92c908 If git credential helper is non-defined, set gh as credential helper 2020-11-23 20:20:05 +01:00
vilmibm
850a7ef243 print nice login message when no auth detected 2020-08-18 17:57:52 -05:00
vilmibm
1efd3ebb51 rebase strife 2020-08-12 12:07:36 -05:00
Mislav Marohnić
aa774c4993 Merge remote-tracking branch 'origin' into issue-commands-isolate 2020-08-12 12:11:01 +02:00
vilmibm
ec25b735ab gh auth status 2020-08-11 15:58:00 -05:00
Mislav Marohnić
a6e78d74de Merge branch 'pr-commands-isolate-3' into issue-commands-isolate 2020-08-11 15:40:05 +02:00
vilmibm
35f18b6c02 gh auth login 2020-08-06 12:43:35 -05:00