pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

cannot install pm2-intercom in containers

Open zhangguanzhang opened this issue 1 year ago • 0 comments

What's going wrong?

# pm2 install pm2-intercom
[PM2][Module] Installing NPM pm2-intercom module
[PM2][Module] Calling [NPM] to install pm2-intercom ...
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/unitech/pm2.git
npm ERR! Warning: Permanently added 'github.com,xx.xxx.243.166' (ECDSA) to the list of known hosts.
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: /root/.npm/_logs/2024-01-23T08_16_02_768Z-debug-0.log
[PM2][ERROR] Installation failed via NPM, module has been restored to prev version

How could we reproduce this issue?

docker run --rm -ti --entrypoint bash node:18-buster-slim
apt-get update
apt-get install -y --no-install-recommends git openssh-client
npm install -g pm2
pm2 install pm2-intercom

resolve way

docker run --rm -ti --entrypoint bash node:18-buster-slim
apt-get update
apt-get install -y --no-install-recommends git openssh-client ca-certificates
npm install -g pm2
git config --global url."https://github.com".insteadOf ssh://[email protected]
pm2 install pm2-intercom

zhangguanzhang avatar Jan 23 '24 08:01 zhangguanzhang