node.js - Docker + Nodejs + Private Repo + Private NPM Module - Access Problems -
I have a node with the docker. I am in the process of setting up the JS service deployment.
I have got a docker file from different instances around the net. The directory for the Dockerfile includes:
- Dockerfile
- id_rsa
- start.sh
This Dockerfile :
from Ubuntu: 13.10 # Make sure that it is still appropriate, get updated updates of RUN # install npm, git, ssh, curl run apt-get install -y npm git git -core SSH curl RMK / NDJS & amp; Curl http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz | Tar xvzf - -C / nodejs --strip-components = 1 # Emptied home ENV path fixes $ pat: / nodejs / bin ENV HOME / root # SSH Setup Run MKDIR-P /root/.ssh ADD id_rsa / root /.ssh / Id_rsa rm chmod 700 /root/.ssh/id_rsa RUn "identification file /root/.ssh/id_rsa" & gt; & Gt; /root/.ssh/ssh_config RUN ssh-keyscan github.com & gt; & Gt; /root/.ssh/known_hosts start start.sh / tmp / run chmod + x /tmp/start.sh cmd ./tmp/start.sh
after the set up is completed Start.sh runs and I experience problems with a private NPM dependency which is a Private Node.js service. This is what is doing start.sh:
CD / TMP tries to remove repo # if it already exists rm -rf mediafx; Correct GIT clone https: // & lt; Username & gt ;: & lt; Password & gt; @ Github.com / Company / exampleRepo.git CD RepoName node --version ls npm Install NODE_ENV = test DEBUG = * PORT = 3000 node server.js
For example in the package. Jason is a private module that we import:
"dependency": {"scribe": "git + ssh: //git@github.com: Company / PrivateDep. Git "},
When NPM installs in this repo, it outputs to these logs:
NPM ERR! Git Clone git@github.com: InboxAppCo / scribe.git Cloning 'in bare repository' /root/.npm/_git-remotes/git-github-com-InboxAppCo-scribe-git-abae334a '... NMP ERR! GIT clone git@github.com: InboxAppCo / scribe.git NPM ERR! GIT clone git@github.com: InboxAppCo / scribe.git Warning: The RSA host key was added permanently to the IP address '19 2.30.252.130' in the list of known hosts. NPM ERR! Git Clone git@github.com: InboxAppCo / scribe.git Permission denied (publisher). NPM ERR! Git Clone git@github.com: InboxAppCo / scribe.git Fatal: NPM ERR can not be read from remote repository! GIT clone git@github.com: InboxAppCo / scribe.git NPM ERR! Git Clone git@github.com: InboxAppCo / scribe.git Please make sure you have the right access rights NPM ERR! GIT clone git@github.com: InboxAppCo / scribe.git and repository are available. NPM ERR! Error: `git 'clone" "--mirror" "git@github.com: InboxAppCo / scribe.git" "/root/.npm/_git-remotes/git-github-com-InboxAppCo-script-git-abae334a" `128 NMP failed with ERR Child Process.Cpclosed (/usr/share/npm/lib/utils/exec.js:59:20) NMM in ERR! In hair process. Enter emitter.imet (events.js: 98: 17) In the NMR ERR! In process. Child process._ handle.onexit (child_process.js: 78 9: 12) NPM ERR! If you need help, you can report on this log: NPM ERR! & LT; Http: //bugs.debian.org/npm>Use NPM ERR! Or NPM ERR! Reportbug --attach / tmp / Med IaFX / npm-debug.log NPM NMP ERR! System Linux 3.16.4-Tincore 64 NMP ERR! Command "/ usr / bin / nodejs" "/ usr / bin / npm" "Installed" NPM ERR! Cwd / tmp / mediafx Npm ERR! Node-v v0.10.15 nmp ERR! Npm -v 1.2.18
I think the git clone of the private node service works fine because its any private NPM Dependence will be easily established.
I am quite positive that the establishment of my SSH is wrong (and it does not reveal itself when GIT private mother- Ita used repo cloning) because I have added the username and password for the link I, however, I am unsure and appreciated guidance for how to do it correctly.
git clone https: //
works because you have the failed, because you are connecting directly to from the host machine Are forwarding. Unfortunately this does not look like the NPM supports the URL format for sending URLs and passwords for the URL: username
and password
and it's Https: // <>
"dependencies": {"scribe": "git + ssh: // git @ github .com: Company / PrivateDep.git"}, < / Code>
ssh
and the docker does not do any ssh agent
Thank you so much for sharing.
ReplyDeleteNode JS Online Training
This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteoracle training in chennai
oracle training institute in chennai
oracle training in bangalore
oracle training in hyderabad
oracle training
oracle online training
hadoop training in chennai
hadoop training in bangalore