Node.js 来自gitlab的npm安装模块

Node.js 来自gitlab的npm安装模块,node.js,https,npm,installation,gitlab,Node.js,Https,Npm,Installation,Gitlab,在node module package.json中,我有: "repository" : { "type":"git", "url":"https://git.domainName.com/Mastash3ff/someprojectname.git" }, 正在尝试通过npm安装。 尝试了各种命令,如: 也试过 npm安装 https://install命令在按下enter键后挂起。npm install gitlab命令弹出: npm ERR! git clone --template=

在node module package.json中,我有:

"repository" : {
"type":"git",
"url":"https://git.domainName.com/Mastash3ff/someprojectname.git"
},
正在尝试通过npm安装。
尝试了各种命令,如:

也试过

npm安装

https://install命令在按下enter键后挂起。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的方式是将它指向cert文件。我的~/.npmrc文件也指向:

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

我没有主意了。我希望这个问题能够得到解决,因为我指出了npm安装命令的错误用法:/

请检查您对repo的访问权限

权限被拒绝(公钥)


检查您对回购协议的访问权限

权限被拒绝(公钥)


没那么容易。我可以很好地从中克隆git。还将私钥添加到ssh-agent中。没那么容易。我可以很好地从中克隆git。还将私钥添加到ssh代理。
  cafile=/home/Mastash3ff/git.someDomainName.com.cert