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

Already on GitHub? Sign in to your account

out of date documentation renders tool totally unusable #7

aspiers opened this Issue Mar 6, 2013 · 9 comments


None yet
2 participants

aspiers commented Mar 6, 2013

This looks like a great tool, but currently I'm not able to try it. AFAICS issue #1 should definitely not have been closed, since the currently documented way to authenticate still does not work at all:

$ gcli init --global
Please specify your GitHub Authentication Token (register on github.com to get it):

and, as already stated, basic auth with tokens is no longer supported. You seem to have made some progress with a replacement solution, but it's not at all clear to me how to use this. Please can you fix the documentation so that I can try it? Thanks!

@aspiers aspiers referenced this issue Mar 6, 2013


Login? #1


piotrmurach commented Mar 6, 2013

@aspiers - agree I have neglected the project for quite while and I recently I've came back to resurrect it from the dead. I've updated the dependency on github_api gem and started going over the commands to update/check/test them to see if they work with the newest api interface. What follows I am not gonna be able to deploy quick fix. I will be working on it the coming weekend and may have something ready to ship. In the meantime you need to get the authentication token to use the tool fully. The somewhat clunky way to do it is through the authorizations api using github_api and referring to docs.

aspiers commented Mar 6, 2013

Thanks for the update. I look forward to the finished version, but any info you could quickly provide on how to get up and running would be much appreciated. If it's not possible to come up with some kind of quick workaround for newbies like myself then it would be worth boarding up broken windows in the README in the short-term. Thanks!


piotrmurach commented Mar 6, 2013

Try running irb session requiring github_api gem. Then do

  g = Github.new login: ..., password: ....
  g.oauth.create 'scopes' => ['repo']  # to create new token
  g.oauth.list  # shows your current tokens

Once you get the token gcli init --local. Of course, if you want to use api calls that don't require authentication just press enter to just generate the config file.

Will keep you updated with the progress updating the codebase.

aspiers commented Mar 6, 2013

It didn't work. The g.oauth.create call returned a Github::ResponseWrapper object with the new authorization, whose body was identical to g.oauth.list.body.last. But when I did a gcli init --global (or --local), gcli auth list results in:

Fatal error has occurred. GET https://api.github.com/authorizations?access_token=99ba1924<censored>7d55e8f8: 404 Not Found/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/github_api-0.9.2/lib/github_api/response/raise_error.rb:14:in `on_complete'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/faraday-0.8.6/lib/faraday/response.rb:9:in `block in call'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/faraday-0.8.6/lib/faraday/response.rb:63:in `on_complete'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/faraday-0.8.6/lib/faraday/response.rb:8:in `call'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/faraday-0.8.6/lib/faraday/response.rb:8:in `call'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/faraday-0.8.6/lib/faraday/response.rb:8:in `call'
/home/adam/.rvm/gems/ruby-1.9.3-p385@global/gems/github_api-0.9.2/lib/github_api/request/oauth2.rb:24:in `call'

piotrmurach commented Mar 7, 2013

Yeah, I've tried that on master and it is still broken, however I can run other commands that require token successfully such as gcli repo ls which lists your own repositories. However, I think until I get to fix oauth and other commands trying to use the old version of this library may be an exercises in frustration - sorry. Will work on it provided time and will let you know about the progress.

aspiers commented Mar 7, 2013

OK great, thanks :)


piotrmurach commented Mar 23, 2013

@aspiers - hey, I've released a new version which has quite few updates. Most importantly, I've rewrote the init and config commands to help with setting up configuration options. Please see readme for the complete workflow. This is my first attempt at making the process as painless as possible. I've added few feature tests to ensure correct behaviour.

Few options have changed so if you have any configs floating around please overwrite them. Once you supply your login and password the gcli auth ls should list your current tokens and gcli auth create ... allow to add new ones. A lot of commands are gonna work but I didn't have time to go through all of them but will in following days.

Please could you take the library for a spin and let me know what you make of it?

aspiers commented Mar 25, 2013

@peter-murach Wonderful, thanks! I will take a look as soon as I get some time, possibly tomorrow.


piotrmurach commented Jun 1, 2013

@aspiers the library has undergone many changes and as result of this thread I have added gcli authorize command that takes you through the quick and easy process of creating authorization token with GitHub. The commands like gcli auth ls will work smoothly see authorization section for more details. The latest v0.6.0 contains all the goodies.

@piotrmurach piotrmurach closed this Jun 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment