You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to use a private git repo as a dependency for a project. We added the following line in our Pipfile: "private" = {git = "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.private.com/path/to/repo.git", editable = true, ref = "v0.0.4"}
When running pipenv install everything works fine but when running pipenv lock it fails because the environment variable is not being expanded.
That pipenv lock works the same way as install, meaning that it will expand the environment variables and produce the Pipfile.lock.
Actual result
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
ne 202, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 256, in get_legacy_dependencies
result = reqset._prepare_file(self.finder, ireq, ignore_requires_python=True)
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/patched/notpip/req/req_set.py", line 526, in _prepare_file
req_to_install.update_editable(not self.is_download)
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/vendor/pip9/req/req_install.py", line 586, in update_editable
vcs_backend.obtain(self.source_dir)
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/vendor/pip9/vcs/git.py", line 142, in obtain
self.run_command(['clone', '-q', url, dest])
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/vendor/pip9/vcs/__init__.py", line 325, in run_command
spinner)
File "/home/pavlos/.local/lib/python3.6/site-packages/pipenv/vendor/pip9/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip9.exceptions.InstallationError: Command "git clone -q https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.private.com/path/to/private.git /tmp/tmp3ffjjgu1source/private" failed with error code 128 in None
Steps to replicate
Add a private repo with an environment variable in the url for the access token and then run pipenv install and pipenv lock. The first command will run just fine while the second will fail with a message like the one above.
The text was updated successfully, but these errors were encountered:
We want to use a private git repo as a dependency for a project. We added the following line in our Pipfile:
"private" = {git = "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.private.com/path/to/repo.git", editable = true, ref = "v0.0.4"}
When running pipenv install everything works fine but when running pipenv lock it fails because the environment variable is not being expanded.
I think this is a side effect of this PR: #2141
$ python -m pipenv.help output
Pipenv version:
'2018.05.18'
Pipenv location:
'/home/pavlos/.local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/bin/python3'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
2.7.15
:/usr/bin/python
2.7.15
:/usr/bin/python2
3.6.5
:/usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-22-generic',
'platform_system': 'Linux',
'platform_version': '#24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'linux'}
Contents of
Pipfile.lock
('/home/pavlos/project/Pipfile.lock'):Expected result
That
pipenv lock
works the same way as install, meaning that it will expand the environment variables and produce the Pipfile.lock.Actual result
Steps to replicate
Add a private repo with an environment variable in the url for the access token and then run
pipenv install
andpipenv lock
. The first command will run just fine while the second will fail with a message like the one above.The text was updated successfully, but these errors were encountered: