3

I need to install a private github module via npm on an AWS Beanstalk instance.

I'm using a Github personal access token to authenticate with github and access the repo.

My package.json lists the dependency like this:

"privatepackage": "git+https://jaf91ja9jasflkjasf98109asf10asdf:x-oauth-basic@github.com/user123/privatepackage.git"

However, on Beanstalk I get the following error when deploying:

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.
ac360
  • 7,735
  • 13
  • 52
  • 91
  • Did you ever find a good solution to this problem? I've found similar questions and solutions (such as the one at the following link), but wondered if you found anything better. https://stackoverflow.com/questions/24993092/how-to-use-a-private-npm-registry-on-elastic-beanstalk – pulekies Aug 02 '17 at 16:10

1 Answers1

0

I think you are missing ssh key on your machine and adding same on github.

Please look into generating-ssh-keys which might helps you to resolve this issue.

webpandit
  • 47
  • 4