github_cli icon indicating copy to clipboard operation
github_cli copied to clipboard

2FA support

Open hkim823 opened this issue 10 years ago • 7 comments

I'd like to know if you can use gcli authorize and 2FA. It doesn't seem to be the case. I can manually create an OAuth token but I thought it would be nice to have.

hkim823 avatar Apr 08 '14 21:04 hkim823

Hi Kim, the answer is no, you cannot use 2FA at the moment as the main github_api dependency doesn't support it yet. I leave this ticket open as a feature request.

piotrmurach avatar Apr 08 '14 21:04 piotrmurach

So interestingly enough, if I just put in my OAuth key and my username in .githubrc alone, even though I have 2FA turned on, I can interact with gcli and my account / orgs that I'm a part of. Just an FYI.

hkim823 avatar Apr 08 '14 21:04 hkim823

@hkim823 workaround didn't work for me. Is there no plan to update this? Many companies require 2FA now and I'd like to use this tool.

AndrewHuffman avatar Jul 09 '17 05:07 AndrewHuffman

@AndrewHuffman There is a plan to update this library but it is low on the priority list. I'm currently really focused on the tty gems and their ecosystem and as a sole OSS developer I have limited time as to what I can achieve. The last time I released this lib was 2013 and I cannot see getting round to releasing new version any time soon. I want to be as honest as possible as to when rewrite of this lib may happen. However, if you decide to submit PRs and get to work on it then we may stand a chance releasing something sooner.

piotrmurach avatar Jul 09 '17 16:07 piotrmurach

@piotrmurach I fully understand. I'll fork and see how quickly this work could be done and hopefully contribute back. This CLI tool was the only one I found that also supported gists and thus my desire to use it.

Thanks for your explanation & contributions!

AndrewHuffman avatar Jul 09 '17 23:07 AndrewHuffman

I just noticed your github API repo, and it appears to support 2FA. I presume this is on an out dated API?

AndrewHuffman avatar Jul 09 '17 23:07 AndrewHuffman

@AndrewHuffman The github_api gem is definitely kept current and should work with 2fa via token param. If I were you I would probably start by going through api calls and add/remove/update them one by one. Each endpoint should have a corresponding spec as well. If you submit any PRs my preference would be to do it in small chunks, easier to review and merge.

piotrmurach avatar Jul 10 '17 12:07 piotrmurach