Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with two factor auth #17

Open
MoOx opened this issue Oct 6, 2015 · 11 comments
Open

Doesn't work with two factor auth #17

MoOx opened this issue Oct 6, 2015 · 11 comments

Comments

@MoOx
Copy link
Contributor

MoOx commented Oct 6, 2015

It seems it should work but it didn't for me (and error is not clear enough)

$ labels ... a-private/repo
>> No permission, enter your username and password:
[?] username: MoOx
[?] password: **********
[?] code: {github code received by sms}
Existing token found!
>> Authorize error
OAuth2 authentication requires a token or key & secret to be set

Any idea what am I doing wrong?

@Marsup
Copy link

Marsup commented Nov 20, 2015

Same error here, I've tracked it down to that line yielding an empty string, I don't know why...

@Marsup
Copy link

Marsup commented Nov 20, 2015

I might add that it worked on another machine yesterday, I'm trying it inside cloud9 now and it doesn't.

@Marsup
Copy link

Marsup commented Nov 20, 2015

So I don't know if it's the same problem for you but I had to revoke my existing token to make it work again. I also logged henrahmagix/github-oauth-prompt#11 to track the source of the problem. It's going to be a problem for people switching computers often, I don't see an alternative.

@jaygeek
Copy link

jaygeek commented Apr 21, 2016

So.... Any tips for this error, gents? [two factor related]

SyntaxError: Unexpected token c
    at Object.parse (native)
    at ###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\lib\github-oauth-prompt.js:115:32
    at Object.proto.sendError (###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\api\v3.0.0\index.js:32:13)
    at ###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\api\v3.0.0\authorization.js:119:29
    at ClientRequest.<anonymous> (###########\AppData\Roaming\npm\node_modules\github-labels\node_modules\github-oauth-prompt\node_modules\github\index.js:770:17)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:256:9)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)

@popomore
Copy link
Owner

@henrahmagix

@ecasilla
Copy link

+1 create this simple go script to do it for me but you need to generate your personal oauth token
https://github.com/ecasilla/github_labelmaker

@henrahmagix
Copy link
Collaborator

henrahmagix commented May 16, 2016

@jaygeek's error seems to be the error response is no longer a JSON-parseable string, but probably just a regular string.

@Marsup If you or anyone else has time to look into and make a pull-request (with tests) for henrahmagix/github-oauth-prompt#11 I'll be happy to review.

Apologies all for missing this and henrahmagix/github-oauth-prompt#11

@RichardLitt
Copy link

I am getting @jaygeek's error too. Is there any word on how to fix that?

@popomore
Copy link
Owner

It seems github api has changed maybe, and the node-github version is really old.

I have forgotten why I use http to request github.

@elijahmanor
Copy link

elijahmanor commented Jul 11, 2018

I was having 2-factor auth problems as well.

A friend of mine mentioned that he had a .github-labels file in his home directory with a GitHub token. I created Personal Access Token on GitHub for public repo access and pasted that token in the .github-labels file.

Then the app worked just fine.

@rocketraman
Copy link

See #37 to use a personal access token

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

No branches or pull requests

9 participants