Git Product home page Git Product logo

Comments (6)

T-vK avatar T-vK commented on August 25, 2024

I think I'm getting a related error during npm i --verbose in a private project:

npm verb stack Error: exited with error code: 128
npm verb stack     at ChildProcess.<anonymous> (/usr/local/nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
npm verb stack     at ChildProcess.emit (events.js:314:20)
npm verb stack     at maybeClose (internal/child_process.js:1022:16)
npm verb stack     at Socket.<anonymous> (internal/child_process.js:444:11)
npm verb stack     at Socket.emit (events.js:314:20)
npm verb stack     at Pipe.<anonymous> (net.js:675:12)
npm verb cwd /builds/projects/my-project
npm verb Linux 3.10.0-1127.19.1.el7.x86_64
npm verb argv "/usr/local/nvm/versions/node/v12.20.0/bin/node" "/node_bin/npm" "ci" "--verbose" "--unsafe-perm=true" "--registry=http://private-registry/repository/ais-npm/"
npm verb node v12.20.0
npm verb npm  v6.14.9
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/bahmutov/local-or-home-npmrc.git
npm ERR! 
npm ERR! Warning: Permanently added 'github.com,140.82.121.3' (RSA) to the list of known hosts.
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128
npm verb exit [ 1, true ]

Not sure where it comes from because pacote is not a direct dependency.

from pacote.

raineorshine avatar raineorshine commented on August 25, 2024

@T-vK You may want to open a new issue. This issue is specifically for when npm install works but pacote packument doesn't.

Your issue appears to be an authentication issue with git ls-remote.

from pacote.

sunknudsen avatar sunknudsen commented on August 25, 2024

Hey @isaacs,

I deleted npm_modules and package-lock.json from a project to clean install everything and now npm is failing.

$ npm install git+ssh://git@react-hash-link:sunknudsen/react-hash-link.git
npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL: git+ssh://git@react-hash-link:sunknudsen/react-hash-link.git

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sunknudsen/.npm/_logs/2021-02-05T15_42_29_710Z-debug.log

This is a pretty big deal for anyone using SSH and private GitHub repos to distribute private packages.

Perhaps I am doing something wrong at my end? I could really use a hand on this one. 🙏

Update: I noticed I had upgraded to npm version 7.5.2. Downgrading to version 6.14.11 (using npm install -g npm@6) solved the ERR_INVALID_URL error when using npm install (I am guessing this error is thrown by a more recent version of pacote used by [email protected]).

from pacote.

sunknudsen avatar sunknudsen commented on August 25, 2024

Hey @ruyadorno,

I see you just published version 11.2.6.

Any chance someone at npm could have a look at this issue?

Sorry for the shout-outs, but things are horribly broken at the moment.

Could really use some feedback on this issue. 🙏

from pacote.

isaacs avatar isaacs commented on August 25, 2024

So, I take it that the react-hash-link host is defined in .ssh/config to log into github.com with some specific key?

I think the issue here is that we're using new URL(..) to parse out the git url, because url.parse() is deprecated. That's where the ERR_INVALID_URL is coming from. I seem to recall that we'd done something to make the scp-style URLs work properly, maybe in the most recent publish? (cc: @nlf)

Maybe we're not fixing this one up properly? Does it work if you replace the : with a /?

from pacote.

sunknudsen avatar sunknudsen commented on August 25, 2024

Good morning @isaacs,

Thanks so much for looking into this.

Does it work if you replace the : with a /?

Yes! I confirm both pacote packument git+ssh://git@react-hash-link/sunknudsen/react-hash-link.git and npm install git+ssh://git@react-hash-link/sunknudsen/react-hash-link.git worked.

Is this the syntax we should use moving forward?

Best,

Sun

from pacote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.