-
Notifications
You must be signed in to change notification settings - Fork 325
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
Use SSH key source secret w/ git+ssh in requirements.txt? #280
Comments
If understand what you want to do, you would need to use a build secret in the build configuration to have the appropriate SSH keys added into the build image. Are you using a build secret already? |
I have the same problem. I got failed when i deployed my app from Openshift template. regards, |
I'm facing a similar issue but using https. I'm already using the source secret and build secret (both are the same secrets).
Any idea on that? |
Well, I tried what @GrahamDumpleton suggested and I still not able to clone the module from a private repository. I created the ssh key with the following command: The build is able to clone my git project (which is in the same domain of the python module). I created a ssh secret and assigned it to the My
I'm receiving the following error:
Waiting for the feedback! Thanks a lot! |
HI,
On the other hand, I tried to get it using some resources of OpenShift but i hadn't sucessful Regards, |
Maybe the issue here is my use of the term "build secret" and what is meant by that. Strictly speaking, it is a build input secret. So you need to add the private SSH key and mount it/copy it into the Only article that comes close to explaining it is: What steps are you trying to use as is? |
Worth highlighting is that the more complicated scenario of needing to prepare
|
Is this issue still relevant or did mentioned articles solved your problem? |
Leave it open for now as a prompt to create a proper cookbook recipe about it as the solution is non obvious. After documenting it, we might find a need to add some helper code in the |
I got this working at one point when doing some initial testing and fortunately documented some things. Here's the solution I was able to work out: MY_GIT_HOST=git-server.com
ssh-keyscan "$MY_GIT_HOST" > ~/git_known_hosts
echo 'ssh -i /path/to/private-key -o UserKnownHostsFile=/opt/app-root/src/git_known_hosts "$@"' > custom_ssh
chmod +x custom_ssh
export GIT_SSH=/opt/app-root/src/custom_ssh After setting this up, git will use your custom command instead of |
Hi @ihadgraft . Would you mind to transfer your last comment to a piece of documentation? |
Try this. Should work.
|
Using the 3.6 S2I container,
pip
needs to pull a dependency from a private git repo as specified in myrequirements.txt
, e.g:The same SSH key source secret that the OpenShift build is presently using to pull the application source code also permits access to this dependency, however the
git+ssh
clone is failing:Is there anything I can do that would allow
pip
to make use of the same SSH key source secret used to clone my app code when installingrequirements.txt
dependencies?Thanks.
The text was updated successfully, but these errors were encountered: