If I'm using nodejs version > 12.14, then I'm receiving access error:
<span>+ npm install eslint@8.25.0</span>
<span>npm ERR! code 128</span>
<span>npm ERR! An unknown git error occurred</span>
<span>npm ERR! command git --no-replace-objects ls-remote ssh://git@bitbucket.org/someprivatereponame/someprivatereponame.git</span>
<span>npm ERR! Warning: Permanently added the RSA host key for IP address 'X.X.X.X' to the list of known hosts.</span>
<span>npm ERR! <a href="mailto:git@bitbucket.org" rel="noopener nofollow noreferrer" target="_blank">git@bitbucket.org</a>: Permission denied (publickey).</span>
<span>npm ERR! fatal: Could not read from remote repository.</span>
<span>npm ERR! </span>
<span>npm ERR! Please make sure you have the correct access rights</span>
<span>npm ERR! and the repository exists.</span>
<span>npm ERR! A complete log of this run can be found in:</span>
<span>npm ERR! /root/.npm/_logs/2022-10-26T10_45_48_521Z-debug-0.log</span>
In packages json file package specified like:
"common-module": "bitbucket:someprivatereponame/common-module#v1.0"
where v1.0 is tag in git.
<span>My pipeline file:</span>
image: node:18.11
definitions:
steps:
- step: &lint
name: Lint application
caches:
- node
script:
- npm install eslint@8.25.0
- npm run lint
clone:
depth: 1
pipelines:
branches:
master: # or the name of your main branch
- step: *lint<span>So the question, what needs to be done to resolve this issue with private repo access? How and where I can provide ssh key?</span>