Closed LeNouveau closed 2 years ago
Hi again,
I figured out.
While I'm stuck, if I press "Enter", I have the following content :
root@XXXX:/home/XXX/Projects# npm install -g meta
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠧ idealTree:lib: sill idealTree buildDeps
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/mateodelnorte/commander.js.git
npm ERR! git@github.com: 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/2022-07-13T07_43_32_405Z-debug-0.log
What disturbs me is ssh://
for the repos name.
It looks like when "blocked", it expect me to authenticate.
But as root, I don't have RSA keys.
I tried to copy my personal RSA keys to root, run the SSH agent before running the installation command and it worked.
So, my problem is resolved.
Regards !
Thanks @LeNouveau this issue was spot on and got me over a few bumps.
For interested readers, a few details that may help:
I got to the root account temporarily with sudo su
for convenience. There may be ways to avoid doing so.
Then:
cd ~
eval `ssh-agent -s`
if you know which exact ssh key you have for github, ssh-add /path/to/.ssh/id_rsa
, or alternatively:
cp -r /home/username/.ssh ./
ssh-add
npm i -g meta
then completed
To clean up processes and possible files (disclaimer: think carefully before killing or deleting) and exit from root shell:
ps aux | grep ssh-agent | grep root
kill -9 112233
cd /root
rm -rf .ssh
exit # log out of superuser
🐛 Bug Report
I'm using Ubuntu 22.04 LTS under WSL. NPM version : 8.13.2
When running
npm install -g meta
, I don't have write access to process the installation.When running
sudo npm install -g meta
, I'm blocked withTo Reproduce
Run
sudo npm install -g meta
.Expected behavior
I would like meta to be installed.