My Server runs on Centos 8 and I installed nodejs latest (v14.17.5) and NPM (v7.21.0), both dont have a .git folder in there.
I have a very very strange issue, If I goto folder example1.com, and run npm install I get the below error,
[root@www centos]# cd /var/www/example1.com/httpdocs/
[root@www chat]# npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/Defipoolhub/node-time.git
npm ERR! [email protected]: 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! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-23T10_03_50_797Z-debug.log
However if goto a different folder, same server, and same package.json, i get no issues at all, how could it be like that,
[root@www centos]# cd /var/www/example2.com/httpdocs/
[root@www chat]# npm install
up to date, audited 224 packages in 3s
4 packages are looking for funding
run `npm fund` for details
4 vulnerabilities (2 low, 2 high)
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
Any idea on how to debug this issue, i did the SELinux disable and that didnt solve the problem.