Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法从github存储库安装到npm_Git_Github_Package_Npm_Yeoman Generator - Fatal编程技术网

无法从github存储库安装到npm

无法从github存储库安装到npm,git,github,package,npm,yeoman-generator,Git,Github,Package,Npm,Yeoman Generator,我在以下位置拥有一个公共github存储库: 我想将其发布为npm包。它有一个package.json文件,该文件具有以下存储库属性: "repository": { "type": "git", "url": "https://github.com/OptiRTC/generator-optidoc.git" } 通过Git Bash,这可以正常工作,并且不会提示输入用户名/pwd: git克隆https://github.com/OptiRTC/generator-op

我在以下位置拥有一个公共github存储库:

我想将其发布为npm包。它有一个package.json文件,该文件具有以下存储库属性:

"repository": {
    "type": "git",
    "url": "https://github.com/OptiRTC/generator-optidoc.git"
  }
通过Git Bash,这可以正常工作,并且不会提示输入用户名/pwd:

git克隆https://github.com/OptiRTC/generator-optidoc.git 试试看

按照中列出的步骤,我可以使用link测试我的包在安装后是否工作。但是,当我开始通过以下方式测试本地安装时:

npm install ../generator-optidoc
。。。由于注释权限被拒绝公钥,该操作失败


有人知道我做错了什么吗?非常感谢。

我可以验证克隆存储库和调用npm安装是否有效,因此它必须与您的公钥有关


你的ssh一切正常吗?你有公钥吗?请尝试ssh add-L以查看您的公钥是否可用。

感谢您回复我,ssh add-L导致无法打开到您的身份验证代理的连接,因此可能是我的问题。但我不明白的是,为什么我需要将SSH密钥配置为使用公共存储库并通过https URL引用。你知道为什么会这样吗?