Search code examples
githubsublimetext3sublime-text-plugingist

Gist plugin erroring out in Sublime Text 3


I'm using Sublime Text 3 on OSX Yosemite and installed the Gist plugin. I could not find the Gist.sublime-settings file via browse packages, so I just went to preferences and found it that way and entered in my Github username and password.

This is the error I'm getting when I try to open or save Gists

enter image description here

Anyone else running into this issue? Does the Gist plugin work with Sublime Text 3?

When the username / password didn't work it looked like I needed to generate a token.

The default Gist plugin settings

{
// Your GitHub API token
// see: https://github.com/condemil/Gist#generating-access-token
"token": "",

// Show GitHub organizations
// Example: "company1", "company2"
"include_orgs": [],

// Show GitHub users
// Example: "user1", "user2"
"include_users": [],

// Show the authors of Gists
"show_authors": false,

// Prefer first file name instead of description in Open Gist menu
"prefer_filename": false,

// Proxy server
// Format: "http://user:pass@proxy:port"
"https_proxy": "",

// Enterprise support
"enterprise": false,
// Github URL
// Default: Leave empty if you want to use GitHub.com
// Example: https://github.domain.com
"url": "",

// Max Gists to show (max 100 allowed by GitHub API)
"max_gists": 100,

// Only use starred gists
"use_starred": false,

// Disable the "save file..." dialog when closing a Gist
"supress_save_dialog": true,

// Update the Gist upon saving the file, suppressing the filename dialog.
"save-update-hook": true

// Limit to gists with specific prefix
//"gist_prefix": "Snippet:",

// Limit to gists with specific tag (#tag)
//"gist_tag": "snippet"
}

Found the instructions here to generate a token: https://github.com/condemil/Gist#generating-access-token

After generating the token, I placed it in the user settings file for the Gist plugin, but still getting the same error.


Solution

  • Got it working!

    Instead of generation a token via the CURL command: https://github.com/condemil/Gist#generating-access-token

    I had to generation a token on Github here: https://github.com/settings/applications#personal-access-tokens

    It produced a string which I pasted into the "token" key in the gist-sublime-settings file instead of the JSON produced by the CURL command.