-
-
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
Environment variables in Pipfile does not resolve over private package #5033
Comments
If I merge the values of the two env variable in to one, works for example GITLAB_AUTH=user:password
works |
Confirmed on my side with Gemfury Pypi private repos :) |
My bad it works on the development version (main branch on github) but and on v2022.4.8 but not on the former version I had. |
this is fixed for me by reverting to |
Your issue with the newer version most likely stems from package index restrictions to enhance the security of pipenv. There have been other related discussions that talk about how to pin your index or put the private index first in the Pipfile. Please see: #5053 (comment) EDIT: Unless I misunderstand that you are actually seeing a regression related to environment variables only? |
@Tlaloc-Es I just tried an example, granted its not 1:1 because my example doesn't have auth, but I used an environment variable as the domain and it locked fine, which leads me to believe it should work for you if you do: Assuming that the rest of the URL is correct and those environment variables are set properly -- is the URL really have
|
Any update since my last comment? I think this is probably resolved but I would like some confirmation that this is working with the variable style |
I've tried the format given in pipenv [[source]]
url = "${CODEARTIFACT_PYPI_ENDPOINT}"
verify_ssl = true
name = "aws_codeartifact" Getting the below error:
Seems like the env var has not been evaluated, considering it as a string instead. |
@DilLip-Chowdary-Codes I don't think that it supports having the entire URL be a variable. The docs call out an example where the user and password are separate variables. |
Full URL works, I tested in the Docker environment, and I need to check out what went wrong in the local environment. |
Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Issue description
Pipenv doesnt load password over a private source
Expected result
Pipenv should put replace the password and install the packages without put the password in Pipfile.lock
Actual result
Any idea about how can I solve this I follow the docs but doesnt work.
Steps to replicate
I had a similar issue,
With the following source
I loaded the .env with the env variables that contain USER and TOKEN, I tried token with several ways like
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --support
Pipenv version:
'2022.1.8'
Pipenv location:
'/home/user/.local/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/bin/python3'
Python installations found:
3.8.10
:/home/user/.pyenv/versions/3.8.10/bin/python
3.8.10
:/usr/bin/python3
3.8.10
:/usr/bin/python3.8
3.8.10
:/bin/python3
3.8.10
:/bin/python3.8
3.6.15
:/home/user/.pyenv/versions/3.6.15/bin/python3.6
3.6.0
:/home/user/.pyenv/versions/3.6.0/bin/python3.6
PEP 508 Information:
System environment variables:
SHELL
SESSION_MANAGER
QT_ACCESSIBILITY
COLORTERM
XDG_CONFIG_DIRS
NVM_INC
XDG_MENU_PREFIX
TERM_PROGRAM_VERSION
GNOME_DESKTOP_SESSION_ID
GNOME_SHELL_SESSION_MODE
SSH_AUTH_SOCK
XMODIFIERS
DESKTOP_SESSION
SSH_AGENT_PID
GTK_MODULES
PWD
KRB5CCNAME
XDG_SESSION_DESKTOP
LOGNAME
XDG_SESSION_TYPE
GPG_AGENT_INFO
XAUTHORITY
VSCODE_GIT_ASKPASS_NODE
GJS_DEBUG_TOPICS
WINDOWPATH
HOME
USERNAME
IM_CONFIG_PHASE
LANG
LS_COLORS
XDG_CURRENT_DESKTOP
GIT_ASKPASS
INVOCATION_ID
MANAGERPID
CHROME_DESKTOP
GJS_DEBUG_OUTPUT
NVM_DIR
VSCODE_GIT_ASKPASS_EXTRA_ARGS
LESSCLOSE
XDG_SESSION_CLASS
TERM
LESSOPEN
USER
VSCODE_GIT_IPC_HANDLE
DISPLAY
SHLVL
NVM_CD_FLAGS
QT_IM_MODULE
XDG_RUNTIME_DIR
PYENV_ROOT
VSCODE_GIT_ASKPASS_MAIN
JOURNAL_STREAM
XDG_DATA_DIRS
GDK_BACKEND
PATH
GDMSESSION
ORIGINAL_XDG_CURRENT_DESKTOP
DBUS_SESSION_BUS_ADDRESS
NVM_BIN
GIO_LAUNCHED_DESKTOP_FILE_PID
GIO_LAUNCHED_DESKTOP_FILE
TERM_PROGRAM
_
OLDPWD
P9K_TTY
_P9K_TTY
ZSH
PAGER
LESS
LSCOLORS
P9K_SSH
NOMAD_ADDR
NOMAD_CLIENT_CERT
NOMAD_CLIENT_KEY
NOMAD_CACERT
NOMAD_TOKEN
CONSUL_HTTP_ADDR
CONSUL_HTTP_SSL
CONSUL_HTTP_SSL_VERIFY
CONSUL_CLIENT_CERT
CONSUL_CLIENT_KEY
CONSUL_CACERT
CONSUL_HTTP_TOKEN
KAFKA_BIN
KAFKA_CONFIG
GOPATH
PYENV_SHELL
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
PIPENV_ACTIVE
PS1
PIP_SHIMS_BASE_MODULE
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/home/user/Software/Kafka/bin:/home/user/Software/Kafka/bin:/home/user/.nvm/versions/node/v16.14.0/bin:/home/user/.poetry/bin:/home/user/.poetry/bin:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user/.fzf/bin:/usr/local/go/bin:/home/user/go/bin:/usr/local/go/bin:/home/user/go/bin
SHELL
:/bin/bash
LANG
:es_ES.UTF-8
PWD
:/home/user/Repos/data-models
Contents of
Pipfile
('/home/user/Repos/data-models/Pipfile'):Contents of
Pipfile.lock
('/home/user/Repos/-data-models/Pipfile.lock'):The text was updated successfully, but these errors were encountered: