找不到您要查找的命名空间
我正在运行一个使用另一个存储库作为依赖项的应用程序,我已将此依赖项添加为 ssh,正如您在我的 package.json
中看到的那样,
...
"dependencies": {
"package_name": "git+ssh://[email protected]:group-name/repo-name.git --legacy-peer-deps",
}
...
但是当我运行 npm install< /code> 它失败并显示以下错误消息。
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/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.
这似乎是身份验证问题,但我已经使用 gtilab 正确设置了 ssh 密钥,并且它正在克隆存储库。
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://[email protected]: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://[email protected]/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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用相同的 npm 命令:
这样,您将看到 Git 在执行 SSH 调用时使用的是什么,以及它是否使用您的 SSH 密钥。
Try the same npm command with:
That way, you will see what Git is using when doing its SSH call, and if it does use your SSH key.
尝试更改 'git+ssh://[电子邮件受保护]:group -name/repo-name.git' 到 https://gitlab.com:group-name/repo-name.git
我有类似的问题,更改网址后,我能够成功推送。
Try changing the 'git+ssh://[email protected]:group-name/repo-name.git' to https://gitlab.com:group-name/repo-name.git
I had a similar problem and after changing the url, I was able to successfully push.