generated from APACGAMONDE/APACGAMONDE
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gh-auth-login.1
75 lines (51 loc) · 1.35 KB
/
gh-auth-login.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.nh
.TH "gh" "1" "Jun 2021" "" ""
.SH NAME
.PP
gh\-auth\-login \- Authenticate with a GitHub host
.SH SYNOPSIS
.PP
\fBgh auth login [flags]\fP
.SH DESCRIPTION
.PP
Authenticate with a GitHub host.
.PP
The default authentication mode is a web\-based browser flow.
.PP
Alternatively, pass in a token on standard input by using \fB\fC\-\-with\-token\fR\&.
The minimum required scopes for the token are: "repo", "read:org".
.PP
The \-\-scopes flag accepts a comma separated list of scopes you want your gh credentials to have. If
absent, this command ensures that gh has access to a minimum set of scopes.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-hostname\fP=""
The hostname of the GitHub instance to authenticate with
.PP
\fB\-s\fP, \fB\-\-scopes\fP=[]
Additional authentication scopes for gh to have
.PP
\fB\-w\fP, \fB\-\-web\fP[=false]
Open a browser to authenticate
.PP
\fB\-\-with\-token\fP[=false]
Read token from standard input
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-help\fP[=false]
Show help for command
.SH EXAMPLE
.PP
.RS
.nf
# start interactive setup
$ gh auth login
# authenticate against github.com by reading the token from a file
$ gh auth login \-\-with\-token < mytoken.txt
# authenticate with a specific GitHub Enterprise Server instance
$ gh auth login \-\-hostname enterprise.internal
.fi
.RE
.SH SEE ALSO
.PP
\fBgh\-auth(1)\fP