繁体   English   中英

来自gitlab的npm install模块

[英]npm install module from gitlab

在节点模块package.json中,我有:

"repository" : {
"type":"git",
"url":"https://git.domainName.com/Mastash3ff/someprojectname.git"
},

尝试通过npm安装。
尝试了各种命令,例如来自https://docs.npmjs.com/cli/install的命令:

npm install gitlab:git.domainName.com/Mastash3ff/someProjectName.git

也尝试过

npm安装https://git.domainName.com/Mastash3ff/someProjectName.git

按下Enter键后,https://安装命令挂起。 npm install gitlab命令弹出:

npm ERR! git clone --template=/home/Mastash3ff/.npm/_git-remotes/_templates --mirror git@gitlab.com:git.domainName.com/Mastash3ff%2FsomeProjectName.git /home/Mastash3ff/.npm/_git-remotes/git-gitlab-com-git-domainName-com-Mastash3ff-2FsomeProjectName-git-a88a1dff9012cf9dc7b0780cba303741: Cloning into bare repository '/home/Mastash3ff/.npm/_git-remotes/git-gitlab-com-git-domainName-com-Mastash3ff-2FsomeProjectName-git-a88a1dff9012cf9dc7b0780cba303741'...
npm ERR! git clone --template=/home/Mastash3ff/.npm/_git-remotes/_templates --mirror git@gitlab.com:git.domainName.com/Mastash3ff%2FsomeProjectName.git /home/Mastash3ff/.npm/_git-remotes/git-gitlab-com-git-domainName-com-Mastash3ff-2FsomeProjectName-git-a88a1dff9012cf9dc7b0780cba303741: Permission denied (publickey).
npm ERR! git clone --template=/home/Mastash3ff/.npm/_git-remotes/_templates --mirror git@gitlab.com:git.domainName.com/Mastash3ff%2FsomeProjectName.git /home/Mastash3ff/.npm/_git-remotes/git-gitlab-com-git-domainName-com-Mastash3ff-2FsomeProjectName-git-a88a1dff9012cf9dc7b0780cba303741: fatal: Could not read from remote repository.
.....

对于gitlab,我们没有ssh身份验证设置,因此我们仅使用https://。 不知道为什么会要求公开密钥。 我们git clone的方法是将其指向cert文件。 我的〜/ .npmrc文件也指向:

  cafile=/home/Mastash3ff/git.someDomainName.com.cert

我没主意了。 我希望可以指出不正确的npm install命令用法来解决此问题:/

检查您对存储库的访问。

权限被拒绝(公钥)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM