github_cli
github_cli copied to clipboard
2FA support
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.
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.
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 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 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 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!
I just noticed your github API repo, and it appears to support 2FA. I presume this is on an out dated API?
@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.