Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when trying to fetch private git repository (npm install) #250

Open
weizenberg opened this issue Aug 10, 2020 · 1 comment
Open

Comments

@weizenberg
Copy link

weizenberg commented Aug 10, 2020

Hello!

I used the s2i-nodejs task from the OpenShift tekton catalog), with the same parameters and settings.

My package.json contains private git (bitbucket) repository, so when the container trying to install the npm modules, it failed with the following message:

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@bitbucket.org/weizenberg/shared.git
npm ERR!
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.

I already defined the ssh secret using the Tekton Auth Tutorial, it's working with git-clone task.

I mounted the .ssh folder to the root folder (instead tekton/home), and run a check to ensure that folder exists with the ssh files:
lrwxrwxrwx. 1 root root 13 Aug 10 13:03 id_rsa -> ..data/id_rsa
lrwxrwxrwx. 1 root root 18 Aug 10 13:03 known_hosts -> ..data/known_hosts

I think the ssh directory should be exposed to the nodejs somehow in your container to solve this issue. You can refer the similar issue in the python container: sclorg/s2i-python-container#280

@ramakila
Copy link

ramakila commented Dec 4, 2022

Hi,

Do you have solution for this problem. I am also facing same issue.
Any guidance to update assemble script to mount the ssh key before container starts?

Thanks,
-Rama.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants