I get “Host key verification failed” when trying to install a npm private package from bitbucket.
What I have done is:
- Copied the Deploy key from Deploy settings of my site.
- Pasted in Bibucket account under /account/settings/ssh-keys/
Reading the doc i see that the npm package should be in the format
"package-name": "git+https://<user>:<app-password>@bitbucket.org/<user>/<repo>.git"
Isn’t unsecure to put the app-passoword in my public package.json?
Shouldn’t be enough to set the SSH key? I usually use only that key and I get access of evrything on the Bitbucket account.
What I am not seeing?
Thank you
Here the full build log
7:58:19 PM: Build ready to start
7:58:21 PM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
7:58:21 PM: build-image tag: v3.7.1
7:58:21 PM: buildbot version: b47b671c7e5601877c51968241eb899bf590a815
7:58:21 PM: Fetching cached dependencies
7:58:21 PM: Starting to download cache of 113.3MB
7:58:23 PM: Finished downloading cache in 2.162767087s
7:58:23 PM: Starting to extract cache
7:58:28 PM: Finished extracting cache in 4.414767916s
7:58:28 PM: Finished fetching cache in 6.62534392s
7:58:28 PM: Starting to prepare the repo for build
7:58:28 PM: Preparing Git Reference refs/heads/urn
7:58:32 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'dist/.uranio/repo/functions' versus 'api' in the Netlify UI
7:58:32 PM: Starting build script
7:58:32 PM: Installing dependencies
7:58:32 PM: Python version set to 2.7
7:58:33 PM: Started restoring cached node version
7:58:36 PM: Finished restoring cached node version
7:58:36 PM: v12.18.0 is already installed.
7:58:37 PM: Now using node v12.18.0 (npm v6.14.4)
7:58:37 PM: Started restoring cached build plugins
7:58:37 PM: Finished restoring cached build plugins
7:58:37 PM: Attempting ruby version 2.7.1, read from environment
7:58:39 PM: Using ruby version 2.7.1
7:58:39 PM: Using PHP version 5.6
7:58:39 PM: Started restoring cached node modules
7:58:39 PM: Finished restoring cached node modules
7:58:39 PM: Installing NPM modules using NPM version 6.14.4
7:58:42 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/prompts/index.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@nodelib/fs.stat-5c4a437a/out/adapters/fs.d.ts'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/types/index.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@nodelib/fs.stat-5c4a437a/out/adapters/fs.spec.d.ts'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/prompts/input.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-plugin-import-ef8b0033/lib/rules/export.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/interpolate.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/prompts/invisible.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/keypress.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-8e85d10d/lib/rules/array-bracket-newline.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@nodelib/fs.stat-5c4a437a/out/index.d.ts'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/prompts/list.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-8e85d10d/lib/rules/array-bracket-spacing.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@nodelib/fs.stat-5c4a437a/out/types/index.d.ts'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/enquirer-eb384812/lib/prompts/multiselect.js'
7:58:42 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@nodelib/fs.stat-5c4a437a/out/index.spec.d.ts'
...
7:58:44 PM: npm WARN netlify-test@0.0.1 No description
7:58:44 PM: npm WARN netlify-test@0.0.1 No license field.
7:58:44 PM: npm ERR! Error while executing:
7:58:44 PM: npm ERR! /usr/bin/git ls-remote -h -t ssh://git@bitbucket.org/user/myrepo.git
7:58:44 PM: npm ERR!
7:58:44 PM: npm ERR! Host key verification failed.
7:58:44 PM: npm ERR! fatal: Could not read from remote repository.
7:58:44 PM: npm ERR!
7:58:44 PM: npm ERR! Please make sure you have the correct access rights
7:58:44 PM: npm ERR! and the repository exists.
7:58:44 PM: npm ERR!
7:58:44 PM: npm ERR! exited with error code: 128
7:58:44 PM: npm ERR! A complete log of this run can be found in:
7:58:44 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-04-21T17_58_44_029Z-debug.log
7:58:44 PM: Error during NPM install
7:58:44 PM: Build was terminated: Build script returned non-zero exit code: 1
7:58:44 PM: Failing build: Failed to build site
7:58:44 PM: Finished processing build request in 22.926066434s