Node.js AWS Beanstalk通过NPM安装私有Github模块导致身份验证问题

Node.js AWS Beanstalk通过NPM安装私有Github模块导致身份验证问题,node.js,amazon-web-services,github,npm,amazon-elastic-beanstalk,Node.js,Amazon Web Services,Github,Npm,Amazon Elastic Beanstalk,我需要通过npm在AWS Beanstalk实例上安装一个私有github模块 我正在使用Github个人访问令牌向Github进行身份验证并访问repo Mypackage.json列出了如下依赖项: “privatepackage”:“git+https://jaf91ja9jasflkjasf98109asf10asdf:x-非统组织-basic@github.com/user123/privatepackage.git“ 但是,在部署Beanstalk时,我遇到以下错误: npm ERR

我需要通过npm在AWS Beanstalk实例上安装一个私有github模块

我正在使用Github个人访问令牌向Github进行身份验证并访问repo

My
package.json
列出了如下依赖项:

“privatepackage”:“git+https://jaf91ja9jasflkjasf98109asf10asdf:x-非统组织-basic@github.com/user123/privatepackage.git“

但是,在部署Beanstalk时,我遇到以下错误:

npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code 128
npm ERR! Command failed: git clone --template=/tmp/.npm/_git-remotes/_templates --mirror git@github.com...
npm ERR! Cloning into bare repository '/tmp/.npm/_git-remotes/git-github-com...
npm ERR! Host key verification failed.
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.

我认为您的计算机上缺少ssh密钥,而在github上添加了相同的密钥


请查看哪些可能有助于您解决此问题。

但是,我不需要ssh,因为我使用的是个人访问令牌。好的,您是否拥有该回购的访问权限。请确认。是的,使用适当的作用域进行完全访问。您是否找到解决此问题的好方法?我发现了类似的问题和解决方案(如下面链接中的问题和解决方案),但不知道您是否发现了更好的方法。