Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json parse error #39

Open
ehaselwanter opened this issue Jan 25, 2011 · 10 comments
Open

json parse error #39

ehaselwanter opened this issue Jan 25, 2011 · 10 comments

Comments

@ehaselwanter
Copy link

gh network list
/Library/Ruby/Gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in initialize': A JSON text must at least contain two octets! (JSON::ParserError) from /Library/Ruby/Gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:innew'
from /Library/Ruby/Gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in parse' from /Library/Ruby/Gems/1.8/gems/github-0.5.0/lib/commands/helpers.rb:400:inget_cache'

@ento
Copy link

ento commented Apr 7, 2011

In my case, I hadn't told git about my github credentials. From github-gem's readme:

Authentication

To let GitHub know who you are, just have your git config set up with your GitHub username and token.

$ git config --global github.user "your-github-username"
$ git config --global github.token "your-github-token"

You can find your token under your account.

After setting that up, gh network list worked smoothly.

@jasonm
Copy link

jasonm commented Jul 21, 2011

I still see this issue, even after adding those configs. Happens in ruby 1.8.7 and 1.9.2 with github gem versino 0.6.2.

@encukou
Copy link

encukou commented Oct 29, 2011

I also get this error.

@paulp
Copy link

paulp commented Dec 1, 2011

I had this very frustrating issue for a long time (is spewing a stack trace really the best error message available?) and finally fixed it by removing GITHUB_USER and GITHUB_TOKEN from my gitconfig and hardcoding my actual credentials.

@jjb
Copy link

jjb commented Jan 18, 2012

I'm having the same problem. None of the proposed solutions work for me.

@savs
Copy link

savs commented Jan 22, 2012

Same error.

@subblue
Copy link

subblue commented Jan 27, 2012

Issue here too with ruby 1.9.2p290, json 1.6.5, json-pure 1.5.4 and github 0.6.2

@evan
Copy link

evan commented Feb 25, 2012

The github gem will drop an invalid empty "network cache" file at .git/network-cache if the credentials are busted. Remove it, fix your credentials, then try.

@shaneog
Copy link

shaneog commented Apr 11, 2012

Same error for me, tried with multiple repositories, both personal and part of an organisation.

I tried removing the .git/network_cache file also but it still doesn't work

@akaihola
Copy link

This issue isn't relevant currently because the network list command doesn't work at all since GitHub deprecated the v2 API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests