Sitelet https://github.com/nodejs/node/issues/295
Skip to content

NPM git dependency's not installing #295

Description

@corbinu

Not sure if this is an NPM issue, but after installing the io.js nightly I am unable to install git dependancies. If this is an NPM issue I can log it there.

I was previously using
NPM 2.2.0
Node 0.12

On OS X 10.10

For example using this package.json

{
    "dependencies": {
        "async": "git+ssh://git@github.com:caolan/async.git#master"
    }
}

gives this error

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using npm@2.2.0
3 info using node@v1.0.0-nightly201501111b8f37bb4d
4 verbose node symlink /usr/local/bin/node
5 warn package.json @ No description
6 warn package.json @ No repository field.
7 warn package.json @ No README data
8 verbose install where, deps [ '/Users/corbinu/Desktop', [ 'async' ] ]
9 verbose install where, peers [ '/Users/corbinu/Desktop', [] ]
10 info preinstall @
11 silly cache add args [ 'async@git+ssh://git@github.com:caolan/async.git#master',
11 silly cache add   null ]
12 verbose cache add spec async@git+ssh://git@github.com:caolan/async.git#master
13 silly cache add parsed spec { raw: 'async@git+ssh://git@github.com:caolan/async.git#master',
13 silly cache add   scope: null,
13 silly cache add   name: 'async',
13 silly cache add   rawSpec: 'git+ssh://git@github.com:caolan/async.git#master',
13 silly cache add   spec: 'ssh://git@github.com:caolan/async.git#master',
13 silly cache add   type: 'git' }
14 verbose addRemoteGit u="ssh://git@github.com:caolan/async.git#master" silent=false
15 silly addRemoteGit normalized { url: 'ssh://git@github.com:caolan/async.git',
15 silly addRemoteGit   branch: 'master' }
16 silly addRemoteGit v ssh-git-github-com-caolan-async-git-bea77bff
17 verbose addRemoteGit /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff not in flight; cloning
18 info git [ 'clone',
18 info git   '--template=/Users/corbinu/.npm/_git-remotes/_templates',
18 info git   '--mirror',
18 info git   'ssh://git@github.com:caolan/async.git',
18 info git   '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff' ]
19 error git clone ssh://git@github.com:caolan/async.git Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
19 error git clone ssh://git@github.com:caolan/async.git ERROR: Repository not found.
19 error git clone ssh://git@github.com:caolan/async.git fatal: Could not read from remote repository.
19 error git clone ssh://git@github.com:caolan/async.git
19 error git clone ssh://git@github.com:caolan/async.git Please make sure you have the correct access rights
19 error git clone ssh://git@github.com:caolan/async.git and the repository exists.
20 verbose stack Error: Command failed: git clone --template=/Users/corbinu/.npm/_git-remotes/_templates --mirror ssh://git@github.com:caolan/async.git /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff
20 verbose stack Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
20 verbose stack ERROR: Repository not found.
20 verbose stack fatal: Could not read from remote repository.
20 verbose stack
20 verbose stack Please make sure you have the correct access rights
20 verbose stack and the repository exists.
20 verbose stack
20 verbose stack     at ChildProcess.exithandler (child_process.js:736:12)
20 verbose stack     at ChildProcess.emit (events.js:119:17)
20 verbose stack     at maybeClose (child_process.js:1000:16)
20 verbose stack     at Socket.<anonymous> (child_process.js:1168:11)
20 verbose stack     at Socket.emit (events.js:116:17)
20 verbose stack     at Pipe.close (net.js:477:12)
21 verbose cwd /Users/corbinu/Desktop
22 error Darwin 14.1.0
23 error argv "node" "/usr/local/bin/npm" "install"
24 error node v1.0.0-nightly201501111b8f37bb4d
25 error npm  v2.2.0
26 error code 128
27 error Command failed: git clone --template=/Users/corbinu/.npm/_git-remotes/_templates --mirror ssh://git@github.com:caolan/async.git /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff
27 error Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
27 error ERROR: Repository not found.
27 error fatal: Could not read from remote repository.
27 error
27 error Please make sure you have the correct access rights
27 error and the repository exists.
28 error If you need help, you may report this error at:
28 error     <http://github.com/npm/npm/issues>
29 verbose exit [ 1, true ]

Activity

  1. rvagg commented on Jan 12, 2015

    @rvagg
    Member
  2. evanlucas commented on Jan 12, 2015

    @evanlucas
    Contributor

    It looks like the url parsing is a little off.

    With node v0.10.35, the url.parse returns something like:

    { protocol: 'ssh:',
      slashes: true,
      auth: 'git',
      host: 'github.com',
      port: null,
      hostname: 'github.com',
      hash: null,
      search: '',
      query: {},
      pathname: '/<user>/<repo>',
      path: '/:<user>/<repo>',
      href: 'ssh://git@github.com/:<user>/<repo>' }
    

    but with the latest nightly:

    { protocol: 'ssh:',
      slashes: true,
      auth: 'git',
      host: 'github.com:<user>',
      port: null,
      hostname: 'github.com:<user>',
      hash: null,
      search: '',
      query: {},
      pathname: '/<repo>',
      path: '/<repo>',
      href: 'ssh://git@github.com:<user>/<repo>' }
    

    Looks like it may have been introduced in c90eac7

  3. rvagg commented on Jan 12, 2015

    @rvagg
    Member

    @evanlucas if you're sure that's the commit could you cc the author into this thread?

  4. evanlucas commented on Jan 12, 2015

    @evanlucas
    Contributor
  5. corbinu commented on Jan 12, 2015

    @corbinu
    Author

    I tried rolling back that commit and building but still have the same issue

  6. evanlucas commented on Jan 12, 2015

    @evanlucas
    Contributor

    ah, sorry, looks like 6120472 was the original

  7. evanlucas commented on Jan 12, 2015

    @evanlucas
    Contributor

    After looking further into it, it looks like d312b6d#diff-bbc5176adff1bbc01acd61bfc85d049fR407 made a change that will also prevent npm from installing git dependencies as prior to that commit, pathname was not being set to this.path

  8. added this to the milestone on Jan 12, 2015
  9. bnoordhuis commented on Jan 12, 2015

    @bnoordhuis
    Member

    #299 has landed but npm install "git+ssh://git@github.com:caolan/async.git#master" still doesn't work because of d312b6d. I'm going to prepare a revert of that commit. Anyone who knows of a better solution, please speak up now.

  10. bnoordhuis commented on Jan 12, 2015

    @bnoordhuis
    Member

    This should be fixed by commits a1e54d6 and 913addb. Thanks for the bug report, @corbinu, and thanks @evanlucas for helping out.

  11. corbinu commented on Jan 12, 2015

    @corbinu
    Author

    Thanks so much guys. Working for me. Will keep testing. Can't wait for the release

  12. qingyuansihai commented on Mar 22, 2019

    @qingyuansihai

    i've ever meet this issue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions