condemil / gist

Sublime Text plugin for creating new Gists from selected text
MIT License
725 stars 136 forks source link

(Enterprise) Gist: GitHub returned error 401: Bad credentials #148

Closed roboslone closed 7 years ago

roboslone commented 10 years ago

My settings are:

{
    "token": "***",
    "enterprise": true,
    "url": "https://github.***.ru",
}

Every time I try to create gist I get "Gist: GitHub returned error 401: Bad credentials" . Changing url to "https://api.github.***.ru" doesn't solve the problem. Token is okay, I checked it with simple curl request to API.

johnhunter commented 10 years ago

Same issue.

When calling open gist on GitHub Enterprise Version 11.10.347

I get the following error in the console:

error: Gist: GitHub returned error 401: Bad credentials
Traceback (most recent call last):
  File "gist in **\Sublime Text 3\Installed Packages\Gist.sublime-package", line 37, in _fn
  File "gist in **\Sublime Text 3\Installed Packages\Gist.sublime-package", line 327, in run
  File "helpers in **\Sublime Text 3\Installed Packages\Gist.sublime-package", line 67, in gists_filter
TypeError: 'NoneType' object is not iterable
error: Gist: unknown error (please, report a bug!)
jonbrenner commented 9 years ago

That's because the plugin continues to make requests to https://api.github.com/gists, despite the configuration. I'm going to fork it and figure it out. I'll submit a pull request for @condemil after it's done.

chrisfowler commented 9 years ago

Did this ever get solved? Am having the issue with similar enterprise setting as RoboSloNE listed.