72
72
gh-token [global options] command [command options] [arguments...]
73
73
74
74
VERSION:
75
- 2.0.0
75
+ 2.0.2
76
76
77
77
COMMANDS:
78
78
generate Generate a new GitHub App installation token
@@ -90,11 +90,13 @@ GLOBAL OPTIONS:
90
90
# ### Run `gh token` as a `gh` CLI extension
91
91
92
92
` ` ` shell
93
- $ gh token generate \
93
+ gh token generate \
94
94
--key ./.keys/private-key.pem \
95
95
--app-id 1122334 \
96
96
--installation-id 5566778
97
+ ` ` `
97
98
99
+ ` ` ` json
98
100
{
99
101
" token" : " ghs_8Joht_______________bLCMS___M0EPOhJ" ,
100
102
" expires_at" : " 2023-09-08T18:11:34Z" ,
@@ -111,11 +113,13 @@ $ gh token generate \
111
113
# ### Run `gh token` and pass the key as a base64 encoded string
112
114
113
115
` ` ` shell
114
- $ gh token generate \
116
+ gh token generate \
115
117
--base64-key $( printf " %s" $APP_KEY | base64) \
116
118
--app-id 1122334 \
117
119
--installation-id 5566778
120
+ ` ` `
118
121
122
+ ` ` ` json
119
123
{
120
124
" token" : " ghs_8Joht_______________bLCMS___M0EPOhJ" ,
121
125
" expires_at" : " 2023-09-08T18:11:34Z" ,
@@ -132,12 +136,14 @@ $ gh token generate \
132
136
# ### Run `gh token` with GitHub Enterprise Server
133
137
134
138
` ` ` shell
135
- $ gh token generate \
139
+ gh token generate \
136
140
--base64-key $( printf " %s" $APP_KEY | base64) \
137
141
--app-id 1122334 \
138
142
--installation-id 5566778 \
139
143
--hostname " github.example.com"
144
+ ` ` `
140
145
146
+ ` ` ` json
141
147
{
142
148
" token" : " ghs_8Joht_______________bLCMS___M0EPOhJ" ,
143
149
" expires_at" : " 2023-09-08T18:11:34Z" ,
@@ -154,7 +160,7 @@ $ gh token generate \
154
160
# ### Fetch list of installations for an app
155
161
156
162
` ` ` shell
157
- $ gh token installations \
163
+ gh token installations \
158
164
--key ./private-key.pem \
159
165
--app-id 2233445
160
166
` ` `
@@ -222,14 +228,15 @@ $ gh token installations \
222
228
# ### Revoke an installation access token
223
229
224
230
` ` ` shell
225
- $ gh token revoke \
231
+ gh token revoke \
226
232
--token " v1.bb1___168d_____________1202bb8753b133919" \
227
233
--hostname " github.example.com"
234
+ ` ` `
228
235
236
+ ` ` ` text
229
237
Successfully revoked installation token
230
238
` ` `
231
239
232
-
233
240
# ## Example in a workflow
234
241
235
242
< details>
0 commit comments