找不到您要查找的命名空间

发布于 2025-01-10 05:18:34 字数 1281 浏览 0 评论 0原文

我正在运行一个使用另一个存储库作为依赖项的应用程序,我已将此依赖项添加为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深海蓝天 2025-01-17 05:18:34

尝试使用相同的 npm 命令:

export GIT_SSH_COMMAND='ssh -Tv'
npm install

这样,您将看到 Git 在执行 SSH 调用时使用的是什么,以及它是否使用您的 SSH 密钥。

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.

匿名的好友 2025-01-17 05:18:34

尝试更改 '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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文