Skip to content
This repository

Instructions to generate the Gist API Token #56

merged 1 commit into from over 1 year ago

6 participants

Jose Aguinaga Dmitry Budaev Michael Guerra 杨帆 Avi Aryan Kirk Sefchik
Jose Aguinaga

Pull request description

I just simply added the instructions in order to create the Gist token. I used the same headings the Settings url has, so making it backwards compatible for users that already have the package.


Dmitry Budaev condemil merged commit d0135c0 into from November 18, 2012
Dmitry Budaev condemil closed this November 18, 2012
Dmitry Budaev

Thank you!

Kirk Sefchik

This isn't working for me. Using
curl -v -u deathgaze -X POST --data "{\"scopes\":[\"gist\"]}"
gives response:
< HTTP/1.1 400 Bad Request
< Server:
< Date: Fri, 18 Jan 2013 17:32:47 GMT
< Content-Type: application/json; charset=utf-8
< Connection: keep-alive
< Status: 400 Bad Request
< X-Content-Type-Options: nosniff
< X-GitHub-Media-Type: github.beta
< Content-Length: 41
< X-RateLimit-Remaining: 4892
< Cache-Control:
< X-RateLimit-Limit: 5000
"message": "Problems parsing JSON"

Using curl version:
curl 7.26.0 (i686-pc-mingw32) libcurl/7.26.0 OpenSSL/0.9.8x zlib/1.2.7
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
smtp smtps telnet tftp
Features: GSS-Negotiate Largefile NTLM SSL SSPI libz

I just ran curl -v -u jjperezaguinaga -X POST --data "{\"scopes\":[\"gist\"]}" without any problems. Maybe you should try without the escaped double quotes:

curl -v -u jjperezaguinaga -X POST -d '{"scopes":["gist"]}'

Hmmm... That's not working either... I suspect it has something to do with the fact that I'm using GitHub for Windows. I was running the command from the Git Shell there. Running curl from Cygwin did the trick. Thanks for the help anyways! :)

Most likely, good to know you solved it :smile:

Michael Guerra

When I run the command in Windows 7 command prompt or powershell, it says it doesn't recognize "curl" as an internal or external command. I'm not command line savvy and don't even know what Cygwin is, but it was over my head when I was looking at it. Any simple way to do this, or am I even putting the command into the right place (command prompt, windows powershell), or is there somewhere else I should be running the command? Thanks!


You may try to run the command in GIt Bash.I succeed in this way in Windows 7.

Michael Guerra

I had GitHub for Windows installed with a folder being watched, so I removed the folder from being watched and then everything worked for some reason. Maybe it was trying to associate it with my GitHub project, I don't know, but removing the project and trying again worked! Thanks for the help.

Avi Aryan

curl -v -u avi-aryan -X POST --data "{\"scopes\":[\"gist\"]}"
I am getting Max Number of Login Attemps exceeded . Any help

Running in Win 7, using Git Shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8 
8 
Source Rendered
@@ -14,6 +14,14 @@ Go to the "Packages" directory (`Preferences` / `Browse Packages…`). Then clon
14 14
15 15
     git clone git://
16 16
+# Generating Access Token
+Currently, the only way to create a Gist Access Token is to curl the authorize API from Github. Here's the command you can run from your terminal to do so:
+    curl -v -u USERNAME -X POST --data "{\"scopes\":[\"gist\"]}"
+Where USERNAME is your Github username. Save the token generated and paste it in the settings section under the token option.
17 25
 # Options
18 26
19 27
 If you're using OS X and have a keychain entry for, no configuration is needed. Otherwise, edit the settings file (it should open automatically the first time you use a Gist command). Note you must specifiy either username AND password or token.

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.