1GH-AUTH-SETUP-GIT(1)           GitHub CLI manual          GH-AUTH-SETUP-GIT(1)
2
3
4

NAME

6       gh-auth-setup-git - Setup git with GitHub CLI
7
8
9

SYNOPSIS

11       gh auth setup-git [flags]
12
13
14

DESCRIPTION

16       This  command  configures git to use GitHub CLI as a credential helper.
17       For more  information  on  git  credential  helpers  please  reference:
18       https://git-scm.com/docs/gitcredentials.
19
20
21       By default, GitHub CLI will be set as the credential helper for all au‐
22       thenticated hosts.  If there is  no  authenticated  hosts  the  command
23       fails with an error.
24
25
26       Alternatively,  use  the --hostname flag to specify a single host to be
27       configured.  If the host is not authenticated with, the  command  fails
28       with an error.
29
30
31

OPTIONS

33       -h, --hostname <string>
34              The hostname to configure git for
35
36
37

EXAMPLE

39       # Configure git to use GitHub CLI as the credential helper for all authenticated hosts
40       $ gh auth setup-git
41
42       # Configure git to use GitHub CLI as the credential helper for enterprise.internal host
43       $ gh auth setup-git --hostname enterprise.internal
44
45
46
47
48

SEE ALSO

50       gh-auth(1)
51
52
53
54                                   Nov 2023               GH-AUTH-SETUP-GIT(1)
Impressum