The namespace you were looking for could not be found

Viewed 298

I'm running an app which uses another repo as a dependency I've added this dependency as a ssh, As u can see below in my package.json

...
"dependencies": {
    "package_name": "git+ssh://git@gitlab.com:group-name/repo-name.git --legacy-peer-deps",
}
...

But when i run npm install it fails with below error message.

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@gitlab.com/group-name/repo-name.git --legacy-peer-deps.git
npm ERR! remote: 
npm ERR! remote: ========================================================================
npm ERR! remote: 
npm ERR! remote: The namespace you were looking for could not be found.
npm ERR! remote: 
npm ERR! remote: ========================================================================
npm ERR! remote: 
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.

It seems like authentication issue but I've setup my ssh key with gtilab properly and it's working on cloning repos.

1 Answers

Try the same npm command with:

export GIT_SSH_COMMAND='ssh -Tv'
npm install

That way, you will see what Git is using when doing its SSH call, and if it does use your SSH key.

Related