componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 306 forks source link

Private Repo doesn't seem to be working #628

Closed aprilb closed 9 years ago

aprilb commented 9 years ago

I have a private repo with the correct user permissions --problem is that it won't load.

% DEBUG=remotes* component install treetopllc/shared-scripts@master

  remotes:local checking local components at /home/nobleweb/go/src/github.com/treetopllc/nobleweb/components +0ms
  remotes:local resolving local remote +10ms
  remotes:local checking folder: /home/nobleweb/go/src/github.com/treetopllc/nobleweb/components/treetopllc/shared-scripts +0ms
  remotes:github GET "https://api.github.com/repos/treetopllc/shared-scripts/tags" +4ms
  remotes:github GET "https://raw.githubusercontent.com/treetopllc/shared-scripts/master/component.json" +592ms
  remotes:github GET "https://raw.githubusercontent.com/treetopllc/shared-scripts/master/component.json" +307ms
  remotes:bitbucket GET "https://api.bitbucket.org/1.0/repositories/treetopllc/shared-scripts/tags" +245ms
  remotes:bitbucket GET "https://api.bitbucket.org/1.0/repositories/treetopllc/shared-scripts/raw/master/component.json" +437ms
  remotes:bitbucket GET "https://bitbucket.org/api/1.0/repositories/treetopllc/shared-scripts/raw/master/component.json" +391ms
  remotes:bitbucket GET "https://api.bitbucket.org/1.0/repositories/treetopllc/shared-scripts/raw/master/component.json" +385ms
  remotes:bitbucket GET "https://bitbucket.org/api/1.0/repositories/treetopllc/shared-scripts/raw/master/component.json" +381ms

       fatal : no remote found for dependency "treetopllc/shared-scripts@master". Visit http://component.github.io/troubleshooting for help.

  remotes:github:api used 1 +440ms
timaschew commented 9 years ago

is it on github or bitbucket? how your component.json looks like?

aprilb commented 9 years ago

github

timaschew commented 9 years ago

need more information:

aprilb commented 9 years ago

{ "name": "shared-scripts", "repository": "treetopllc/shared-scripts", "version": "0.0.0", "private": true, "description": "Treetop Commons shared Javascript files", "main": "index.js", "scripts": [ "index.js" ] }

aprilb commented 9 years ago

netrc which is valid. component version 1.0.0

timaschew commented 9 years ago

I add add you to my private test reop, it works fine for me with component 1.0.2

$ component install timaschew/TodoFPM-test-private

   installed : timaschew/todofpm-test-private@master in 783ms
     install : complete 

is it working for you?

timaschew commented 9 years ago

can you show me the content of your netrc (without the password/token)

aprilb commented 9 years ago

machine github.com login xxxxxx password x-oauth-basic

machine api.github.com login xxxxxx password x-oauth-basic

aprilb commented 9 years ago

actually i am using component 1.0.2

aprilb commented 9 years ago

did you say you added me to timaschew/TodoFPM-test-private?

$ component install timaschew/TodoFPM-test-private

fatal : no remote found for dependency "timaschew/todofpm-test-private@master". Visit http://component.github.io/troubleshooting for help.
timaschew commented 9 years ago

your netrc is wrong, you need to change the first host entry, instead of github.com you need raw.githubusercontent.com

There was an error in the guide, it was fixed some weeks ago: https://github.com/componentjs/guide/blob/master/component/getting-started.md#configuring-github-access

aprilb commented 9 years ago

ok, great. yeah, that did it. thanks for looking into it.

aprilb commented 9 years ago

actually, looks like I needed all three:

$ cat $HOME/.netrc machine github.com login xxxxxxxxx password x-oauth-basic

machine raw.githubusercontent.com login xxxxxxxxx password x-oauth-basic

machine api.github.com login xxxxxxxxx password x-oauth-basic

timaschew commented 9 years ago

What's the error if you omit the github.com host? Because there should be no request for this host. If there is an error DEBUG=* component install user/repo should show where the error comes from

aprilb commented 9 years ago

Here is the error if i leave out api.github.com:

Error: no remote found for dependency "mochajs/mocha". at Resolver. (/home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-resolver/build/semver.js:565:13) at Generator.invoke (/home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-resolver/build/index.js:141:31) at Generator.invoke (/home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-resolver/build/index.js:79:50) at next (/home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-resolver/node_modules/co/index.js:74:21) at /home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-resolver/node_modules/co/index.js:93:18 at Gunzip.onEnd (/home/nobleweb/go/src/github.com/treetopllc/nobleweb/node_modules/component-remotes/node_modules/cogent/node_modules/raw-body/index.js:136:7) at Gunzip.g (events.js:180:16) at Gunzip.emit (events.js:117:20) at _stream_readable.js:943:16 at process._tickCallback (node.js:419:13)

timaschew commented 9 years ago

no, drop github.com not api.github.com

instead of github.com you need raw.githubusercontent.com

aprilb commented 9 years ago

kk. Will do.