Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

0.2.6 -> 0.2.7 - Bad Credentials #6

Closed
Dayjo opened this issue Nov 9, 2015 · 11 comments
Closed

0.2.6 -> 0.2.7 - Bad Credentials #6

Dayjo opened this issue Nov 9, 2015 · 11 comments

Comments

@Dayjo
Copy link
Contributor

Dayjo commented Nov 9, 2015

Hello,

Since updating to 0.2.7 today, I just get the 'Bad Credentials' error when I try and list my Gists. I can't see anything in the changes that would have affected this.

I have tried generating a new token and working with that, but get the same error.

Is there some more debug info I can get that would be useful?

@aki77
Copy link
Owner

aki77 commented Nov 10, 2015

When Atom v1.1.0 on OSX, I can't reproduce this issue..
Please post your settings.

@Dayjo
Copy link
Contributor Author

Dayjo commented Nov 10, 2015

Hi @aki77,

Thanks for your reply, here's my settings, with a new token in. REally not sure why all of a sudden it's stopped working

image

I uninstalled the package and re-installed (it maintained my token), but still getting Bad Credentials error.

I'm feeling like it's actually causing an internal error with the package, because once the error occurs, the package won't work unless I open another tab to use it on;

@aki77
Copy link
Owner

aki77 commented Nov 10, 2015

Please test your token using the curl.

curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/gists/starred

Replace "OAUTH-TOKEN" with your actual token.

A curl tutorial using GitHub's API

@Dayjo
Copy link
Contributor Author

Dayjo commented Nov 10, 2015

Yeah that works fine.

@aki77
Copy link
Owner

aki77 commented Nov 10, 2015

After running the gist:list command , please check the following.

https://gyazo.com/a87980c2ddbf4fba324f9d31788e0669

@Dayjo
Copy link
Contributor Author

Dayjo commented Nov 10, 2015

It's the token, plus a new line, plus the token again i.e.

"token
token"

@aki77
Copy link
Owner

aki77 commented Nov 10, 2015

Please check the following.

https://gyazo.com/818176d0304bf304523465baa2df34c4

Replace /Users/aki with your home directory.

@Dayjo
Copy link
Contributor Author

Dayjo commented Nov 10, 2015

No such file or directory.

I have resolved the issue however. I thought it was odd that it was returning the double token. So I deleted the token and tried again.. watch..

The value of the token field is literally;

my_token
my_token

So somehow I managed to paste in the token twice, with a new line between them. And for some reason the single line options allow new line characters (which you then can't see). My bad, but potentially needs some extra validation on that field so that it doesn't contain new lines, or maybe it's a bug with Atom.

Happy for this to be closed, unless you want to keep it open and add some validation?

@aki77
Copy link
Owner

aki77 commented Nov 11, 2015

Noted with thanks! 😃
I want to add a validation.

aki77 added a commit that referenced this issue Nov 11, 2015
@aki77
Copy link
Owner

aki77 commented Nov 11, 2015

Added debug settings.

@aki77 aki77 closed this as completed Nov 11, 2015
@Dayjo
Copy link
Contributor Author

Dayjo commented Nov 11, 2015

👍 nice one, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants