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

V2 api token is not available anymore #163

ahoy-jon opened this Issue Apr 14, 2012 · 15 comments


None yet
10 participants

How can we use hub now ?


mislav commented Apr 15, 2012

I need to update it. Follow this issue for updates

thank you !

cmillr commented Apr 16, 2012


mkenyon commented Apr 16, 2012



mislav commented Apr 17, 2012

I have started the work in the "api-v3" branch: https://github.com/defunkt/hub/compare/api-v3

So far I've paved way to use API v3 for GitHub.com, but keep using API v2 for Enterprise installations (because I'm not sure if they support API v3 and OAuth). It's not done yet; I need to implement the actual v3 calls, but I've done most of the work around authentication, obtaining and saving the OAuth token in a config file.


mislav commented Apr 17, 2012

OK, I've implemented it. I haven't updated the tests yet, so they're all broken in the api-v3 branch.

The implementation should work. If you're eager to try it out, use:

$ git checkout api-v3
$ rake install PREFIX=/usr/local

You should remove all the github.user/token values from your "~/.gitconfig". They are not supported anymore.

I just had to uninstall the hub I had, I just tested hub pull-request and it is working perfect for me. Thanks.

cmillr commented Apr 17, 2012

Works for me too.

To be clear, it did not work for me until I re-added the github.user setting to my ~/.gitconfig. Before I set that, it prompted me for a password for the 0-character-long username.


jfirebaugh commented Apr 17, 2012

I didn't have a ~/.config directory, and hub complained:

$ git pull-request
github.com password for jfirebaugh (never stored): 
/usr/local/bin/hub:454:in `initialize': No such file or directory - /Users/john/.config/hub (Errno::ENOENT)
    from /usr/local/bin/hub:454:in `open'
    from /usr/local/bin/hub:454:in `save'
    from /usr/local/bin/hub:435:in `fetch_value'
    from /usr/local/bin/hub:493:in `oauth_token'
    from /usr/local/bin/hub:581:in `send'
    from /usr/local/bin/hub:581:in `try_config'
    from /usr/local/bin/hub:588:in `try_config'
    from /usr/local/bin/hub:570:in `method_missing'
    from /usr/local/bin/hub:364:in `apply_authentication'
    from /usr/local/bin/hub:345:in `perform_request'
    from /usr/local/bin/hub:324:in `post'
    from /usr/local/bin/hub:303:in `create_pullrequest'
    from /usr/local/bin/hub:1313:in `pull_request'
    from /usr/local/bin/hub:1198:in `send'
    from /usr/local/bin/hub:1198:in `run'
    from /usr/local/bin/hub:1945:in `initialize'
    from /usr/local/bin/hub:1949:in `new'
    from /usr/local/bin/hub:1949:in `execute'
    from /usr/local/bin/hub:1996

czzarr commented Apr 23, 2012

ETA on when this will be merged and published on brew? (to see if i need to bother uninstalling/reinstalling)

Line 1426/1433, i get 'repo' in the data, not 'repository'

+1, Would be good to have this in master

ghickman commented May 3, 2012

+1, would be great to have this installable from brew.


mislav commented May 4, 2012

Hey all. Thanks for testing the "api-v3" branch. I've merged it in master: b4c5ea0. I'm releasing it right now on Homebrew, so it will be available later.

@cmillr @jonathanselander: thanks, I've fixed those issues.

@mislav mislav closed this May 4, 2012

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