vardhan
vardhan

Reputation: 53

Error while executing /usr/bin ls-remote -h -t ssh://[email protected]/xxxx/xxxx.git while pushing to heroku

I have a nodejs application. I am trying to push it to heroku and execute it in heroku. While deplying via heroku CLI, I am facing an issue. Please help. Thanks. I am aware that this can be solved in local system with the help of git config --global url."https://".insteadOf ssh:// but how do I solve it while deploying to Heroku?

remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving node version 12.x...
remote:        Downloading and installing node 12.16.2...
remote:        Using default npm version: 6.14.4
remote:
remote: -----> Installing dependencies
remote:        Installing node modules (package.json + package-lock)
remote:        npm ERR! Error while executing:
remote:        npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/xxxx/xxx.git
remote:        npm ERR!
remote:        npm ERR! Host key verification failed.
remote:        npm ERR! fatal: Could not read from remote repository.
remote:        npm ERR!
remote:        npm ERR! Please make sure you have the correct access rights
remote:        npm ERR! and the repository exists.
remote:        npm ERR!
remote:        npm ERR! exited with error code: 128
remote:
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.FA1w0/_logs/2020-04-14T06_41_51_429Z-debug.log
remote:
remote: -----> Build failed
remote:
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        Some possible problems:
remote:
remote:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote:        Love,
remote:        Heroku
remote:

Upvotes: 2

Views: 2015

Answers (2)

Kirkman14
Kirkman14

Reputation: 1676

Another workaround, based on this comment in the NPM repository, is to configure Git so that it is forced to use https instead of SSH:

git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://

Upvotes: 2

heo
heo

Reputation: 31

Just ran into the same problem. Still don't know how to fix it properly. But a quick fix is manually to replace ssh://[email protected]/xxxx/xxx.git with https://github.com/xxxx/xxx.git in package-lock.json file.

Upvotes: 2

Related Questions