You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/gist.1
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
.\" generated with Ronn/v0.7.3
2
2
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
.
4
-
.TH "GIST" "1" "May 2017" "" "Gist manual"
4
+
.TH "GIST" "1" "January 2018" "" "Gist manual"
5
5
.
6
6
.SH "NAME"
7
7
\fBgist\fR\- upload code to https://gist\.github\.com
@@ -149,6 +149,25 @@ gist \-a a\.rb
149
149
.
150
150
.IP""0
151
151
.
152
+
.P
153
+
If you have a complicated authorization requirement you can manually create a token file by pasting a Github token with only the \fBgist\fR permission into a file called \fB~/\.gist\fR\. You can create one from https://github\.com/settings/tokens
154
+
.
155
+
.P
156
+
This file should contain only the token (~40 hex characters), and to make it easier to edit, can optionally have a final newline (\en or \er\en)\.
157
+
.
158
+
.P
159
+
For example, one way to create this file would be to run:
160
+
.
161
+
.IP""4
162
+
.
163
+
.nf
164
+
165
+
echo MY_SECRET_TOKEN > ~/\.gist
166
+
.
167
+
.fi
168
+
.
169
+
.IP""0
170
+
.
152
171
.SS "GitHub Enterprise"
153
172
If you\'d like \fBgist\fR to use your locally installed GitHub Enterprise \fIhttps://enterprise\.github\.com/\fR, you need to export the \fBGITHUB_URL\fR environment variable (usually done in your \fB~/\.bashrc\fR)\.
Once you\'ve done this and restarted your terminal (or run \fBsource~/\.bashrc\fR), gist will automatically use github enterprise instead of the public github\.com
167
186
.
168
187
.P
169
-
Your token for GitHub Enterprise will be stored in \fB\.gist\.<protocol>\.<server\.name>[\.<port>]\fR (e\.g\.\fB~\.gist\.http\.github\.internal\.example\.com\fR for the GITHUB_URL example above) instead of \fB~/\.gist\fR\.
188
+
Your token for GitHub Enterprise will be stored in \fB\.gist\.<protocol>\.<server\.name>[\.<port>]\fR (e\.g\.\fB~/\.gist\.http\.github\.internal\.example\.com\fR for the GITHUB_URL example above) instead of \fB~/\.gist\fR\.
170
189
.
171
190
.P
172
191
If you have multiple servers or use Enterprise and public GitHub often, you can work around this by creating scripts that set the env var and then run \fBgist\fR\. Keep in mind that to use the public GitHub you must unset the env var\. Just setting it to the public URL will not work\. Use \fBunsetGITHUB_URL\fR
0 commit comments