Use SSH key source secret w/ git+ssh in requirements.txt?

Open
#280 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, git, python

Research direction

Start with the 3.6 S2I container build behavior described in the issue, the requirements.txt entry, and the SSH key source secret used to clone the application. Reproduce the pip git+ssh installation failure and trace how the build exposes the secret and resolves the repository hostname. Done means a private dependency in requirements.txt can be cloned with the same source secret.

Written by the indexing model from the issue text.

Description

help wanted openshift

Using the 3.6 S2I container, pip needs to pull a dependency from a private git repo as specified in my requirements.txt, e.g:

git+ssh://git@github.organization.org:github-user/githib-repo.git@some_tag

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:

Collecting git+ssh://git@github.organization.org:github-user/githib-repo.git@some_tag (from -r requirements.txt (line 9))
Cloning ssh://git@github.organization.org:github-user/githib-repo.git@some_tag (to some_tag) to /tmp/pip-7tf7baqk-build
ssh: Could not resolve hostname github.organization.org: Name or service not known
fatal: Could not read from remote repository.

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 installing requirements.txt dependencies?

Thanks.

Dominant language
Shell
Stars
271
Forks
329
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sclorg/s2i-python-container

All issues in sclorg/s2i-python-container

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.