github-gem
github-gem copied to clipboard
create doesn't work without insane genius
I've never been able to get the 'gh create' calls to work. I tried all sorts of combinations and trying to specify the repo in different ways. Nada. So I decided to write up an issue...then I decided I'd better just look at the source. And there is, some mysterious github token! I didn't have one. So I googled and discovered that I do have one and I need to set that in my global git config.
Could you please add a line saying that you need to do this step to the install?! Unless I'm missing something how would any normal person know to do this?
Cheers, Karl
PS A check that the token isn't empty would be good in the 'create' calls..or wherever it's needed. Perhaps that would even be enough. 'You haven't configured your GitHub API key! Please go to http://github.com/[github_user] and blah...'
I added some code to help with this here
http://github.com/barryk/github-gem/commit/36063bf5ae8731eca1c0afd9e0c4a9ccb99705fa
Part of my PullRequest branch http://github.com/barryk/github-gem/tree/PullRequest
First time you run "create" it asks for your user and token, and explains where to get the token... So I think this thread could be closed, isn't it?
I've hit this today, and it seems like support for the API token is being removed.
Is there an alternative right now?
I gave create an API token with all possible access rights, but it gives me the error:
gh create new-repo
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
There are no more access rights, and of course the repository doesn't exist – I'm trying to create it.
Also:
$ cd new-repo
$ git init .
$ gh create-from-local new-repo
(JSON::ParserError)gems/2.1.0/gems/json_pure-1.5.5/lib/json/common.rb:148:in `parse': 757: unexpected token at '<html>
<head><title>410 Gone</title></head>
<body bgcolor="white">
<center><h1>410 Gone</h1></center>
<hr><center>nginx</center>
</body>
</html>'
from /usr/local/lib/ruby/gems/2.1.0/gems/json_pure-1.5.5/lib/json/common.rb:148:in `parse'
from /usr/local/lib/ruby/gems/2.1.0/gems/github-0.7.2/lib/commands/commands.rb:260:in `block in load'
from /usr/local/lib/ruby/gems/2.1.0/gems/github-0.7.2/lib/github/command.rb:25:in `call'
from /usr/local/lib/ruby/gems/2.1.0/gems/github-0.7.2/lib/github.rb:76:in `invoke'
from /usr/local/lib/ruby/gems/2.1.0/gems/github-0.7.2/lib/github.rb:70:in `activate'
from /usr/local/lib/ruby/gems/2.1.0/gems/github-0.7.2/bin/gh:8:in `<top (required)>'
from /usr/local/bin/gh:23:in `load'
from /usr/local/bin/gh:23:in `<main>'