-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
pipenv install with private source doesn't use provided environment variables #1906
Comments
Dotenv are only loaded with |
It's fine that the .env approach doesn't work, but shouldn't the other ones work? |
I am experiencing the same issue, it's downloading packages but failing to update/create Pipfile.lock |
Yes if these are set outside of .env this should work just fine. Tested this against current master and it is definitely working, so if it isn't for you try master |
Hi. It's not working with latest code, at least in my setup. Here is my Pipfile
Here is what I get using
Drilling down the code it appears that at line 1061 in core.py when I'm just not sure where the best place is to actually fix this issue without causing another bug later down the row.. |
gotcha, so the issue occurs during locking because of @property
def _lockfile(self):
"""Pipfile.lock divided by PyPI and external dependencies."""
pfile = pipfile.load(self.pipfile_location, inject_env=False)
lockfile = json.loads(pfile.lock())
for section in ('default', 'develop'):
lock_section = lockfile.get(section, {})
for key in list(lock_section.keys()):
norm_key = pep423_name(key)
lockfile[section][norm_key] = lock_section.pop(key)
return lockfile |
I don't know if it's psosible to address this without also patching the piptools resolver debug logging functionality to prevent it from logging the interpolated index urls to the console... |
I am also affected by this problem. Are there any news? |
@eolo999 not yet unfortunately. We will update here when we get this sorted |
- Fixes #1906 Signed-off-by: Dan Ryan <[email protected]>
@techalchemy when you plan to release new version of |
@Gr1N finishing up an automated suite that handles rebuilding vendored dependencies with licenses (due to some legal issues) => see #2035 -- I want to get this included because it adjusts for some SSL changes Ideally this will be out today, at the very least I can put it up in prerelease for testing purposes once builds are passing |
sorry for the holdup |
|
@techalchemy version
It's not true anymore, as I see in
|
Found an issue #2037 |
Expected result
Have configured a private source which require username and password to authenticate. (It's a privately hosted https://jfrog.com/artifactory/ pypi repo.)
When running
ARTIFACTORY_USERNAME=myuser ARTIFACTORY_PASSWORD=mypass pipenv install
from the same directory as the pipfile on a project, I would expect the env-variables in the private source to use the values I provided.I've also tried to provide env-variables in other way:
All of the above give me the same result error result (below).
When I provide the username and password directly inline in the pipfile it works fine, but when I use environment variables instead it fails with the following error:
I assume it's just a confusing error message to tell me that the authentication fails, since I get the exact same error message if I put in an invalid username or password directly in the pipfile private source description.
Steps to replicate
pipfile which use source that require authentication. Use env variables for credentials:
Run pipenv install where you provide credentials:
ARTIFACTORY_USERNAME=user ARTIFACTORY_PASSWORD=pass pipenv install
What am I doing wrong?
$ python -m pipenv.help output
Pipenv version:
'11.9.0'
Pipenv location:
'/usr/local/lib/python2.7/dist-packages/pipenv'
Python location:
'/usr/bin/python'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.5
:/usr/bin/python3.5m
3.5
:/usr/bin/python3.5
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
2.7.12
:/usr/bin/python
2.7.12
:/usr/bin/python2
3.5.2
:/usr/bin/python3
PEP 508 Information:
System environment variables:
LC_NUMERIC
MANDATORY_PATH
CONSCRIPT_OPTS
_LXSESSION_PID
XDG_GREETER_DATA_DIR
SPARK_HOME
PROJECT_HOME
LC_CTYPE
PYTHONDONTWRITEBYTECODE
XDG_CURRENT_DESKTOP
LC_PAPER
LOGNAME
XDG_SEAT
PATH
XDG_VTNR
QT_PLATFORM_PLUGIN
PYTHONUNBUFFERED
VIRTUALENVWRAPPER_SCRIPT
ZSH
DISPLAY
XDG_SESSION_DESKTOP
LANG
CONFIRMIT_CFG_DIR
TERM
SHELL
XDG_SESSION_PATH
XAUTHORITY
LANGUAGE
SHLVL
QT_QPA_PLATFORMTHEME
TERMINATOR_UUID
PIP_REQUIRE_VIRTUALENV
WINDOWID
_
SSH_AGENT_PID
HOME
LC_MONETARY
XDG_CONFIG_HOME
SAL_USE_VCLPLUGIN
CONSCRIPT_HOME
XDG_RUNTIME_DIR
WORKON_HOME
VIRTUALENVWRAPPER_PROJECT_FILENAME
LC_ADDRESS
SSH_AUTH_SOCK
VIRTUALENV_PYTHON
GDMSESSION
VIRTUALENVWRAPPER_WORKON_CD
CONFIRMIT_CFG_HOME
IBUS_DISABLE_SNOOPER
XDG_SEAT_PATH
PIP_PYTHON_PATH
XDG_SESSION_ID
DBUS_SESSION_BUS_ADDRESS
ORBIT_SOCKETDIR
VIRTUALENVWRAPPER_HOOK_DIR
LC_IDENTIFICATION
DESKTOP_SESSION
LSCOLORS
XDG_CONFIG_DIRS
DEFAULTS_PATH
XDG_SESSION_TYPE
OLDPWD
LS_COLORS
GDM_LANG
LC_TELEPHONE
LC_MEASUREMENT
PWD
COLORTERM
LC_NAME
XDG_MENU_PREFIX
LC_TIME
LESS
PAGER
XDG_DATA_DIRS
USER
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/andreas/.conscript/bin:/opt/spark-2.2.1/bin:/opt/flink/bin:/home/andreas/activator-dist-1.3.12/bin:/home/andreas/bin:/home/andreas/bin:/home/andreas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
SHELL
:/usr/bin/zsh
LANG
:en_US.UTF-8
PWD
:/path-to-project
Contents of
Pipfile
('/path-to-project/Pipfile'):The text was updated successfully, but these errors were encountered: