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
This token is stored in \fB~/\.gist\fR and used for all future gisting\. If you need to you can revoke it from https://github\.com/settings/applications, or just delete the file\. If you need to store tokens for both github\.com and a Github Enterprise instance you can save your Github Enterprise token in \fB~/\.gist\.github\.example\.com\fR where "github\.example\.com" is the URL for your Github Enterprise instance\.
142
+
This token is stored in \fB~/\.gist\fR and used for all future gisting\. If you need to you can revoke it from https://github\.com/settings/tokens, or just delete the file\.
127
143
.
128
144
.IP"\(bu"4
129
145
After you\'ve done this, you can still upload gists anonymously with \fB\-a\fR\.
@@ -133,6 +149,31 @@ gist \-a a\.rb
133
149
.
134
150
.IP""0
135
151
.
152
+
.SS "GitHub Enterprise"
153
+
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
+
.
168
+
.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\.
170
+
.
171
+
.P
172
+
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
173
+
.
174
+
.SS "Token file format"
175
+
If you cannot use passwords, as most Enterprise installations do, you can generate the token via the web interface and then simply save the string in the correct file\. Avoid line breaks or you might see: \fB$gist\-lError:Badcredentials\fR
176
+
.
136
177
.TP
137
178
You can also use Gist as a library from inside your ruby code:
138
179
.
@@ -188,19 +229,6 @@ This will take them through the process of obtaining an OAuth2 token, and storin
188
229
.
189
230
.IP""0
190
231
.
191
-
.SH "GitHub enterprise"
192
-
.
193
-
.IP"\(bu"4
194
-
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 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
0 commit comments