-
-
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
Exception when installing Git VCS dependency with plus symbol in HTTP basic auth #4271
Comments
Got the same issue with the actual version:
Pipenv is asking for password although I'm using a token. |
After some digging, it seems that >>> from pipenv.vendor.requirementslib.models.url import URI
>>> url = 'git+https://foo+bar:baz@example.org'
>>> URI.parse(url)
URI(host='example.org', scheme='git+https', port=None, path=None, query='', fragment=None, subdirectory=None, ref='', username='foo+bar', query_dict=omdict([('', '')]), name='', extras=(), is_direct_url=False, is_implicit_ssh=False, _fragment_dict={}, _username_is_quoted=True, _password_is_quoted=False)
>>> print(URI.parse(url))
git+https://foo bar:----@example.org RFC 3986 specifies that the |
Thanks for the report, and for the debugging, and sorry for the issue! |
Issue description
Running
pipenv install
with a Git VCS dependency that has a plus symbol in the HTTP basic auth part of the URL produces anInstallationError
due to a failed HTTP basic authentication.It seems the URL is internally rewritten incorrectly, since the output logs the URL with the plus symbol replaced by a space (
%20
).The behaviour was not observed in
pipenv==2018.11.26
, but occurs in latestpipenv==2020.5.28
.Expected result
Pipenv should install the VCS dependency without errors.
Actual result
pipenv install
raises anInstallationError
. Note the Git clone URL in the error message:git clone -q 'https://gitlab%20deploy-token-3:****@gitlab.aai.lab/tms/tms-core.git'
, which contains a space character instead of the plus sign:Steps to replicate
Command:
pipenv install -d
Pipfile:
$ pipenv --support
Pipenv version:
'2020.5.28'
Pipenv location:
'/home/adriano/.virtualenvs/pipenv2020/lib/python3.8/site-packages/pipenv'
Python location:
'/home/adriano/.virtualenvs/pipenv2020/bin/python'
Python installations found:
3.8.2
:/home/adriano/.virtualenvs/pipenv2020/bin/python3
3.8.2
:/home/adriano/.virtualenvs/pipenv2020/bin/python3.8
3.8.2
:/home/adriano/.virtualenvs/pipenv2020/bin/python3
3.8.2
:/home/adriano/.virtualenvs/pipenv2020/bin/python3.8
3.8.2
:/usr/bin/python3
3.8.2
:/usr/bin/python3.8
3.8.2
:/bin/python3
3.8.2
:/bin/python3.8
3.7.7
:/home/adriano/.pyenv/versions/3.7.7/bin/python3
2.7.18
:/usr/bin/python2.7
2.7.18
:/usr/bin/python2
2.7.18
:/bin/python2.7
2.7.18
:/bin/python2
PEP 508 Information:
System environment variables:
SHELL
LSCOLORS
WINDOWID
PYENV_HOOK_PATH
COLORTERM
PYENV_SHELL
CSF_MDTVTexturesDirectory
LESS
XDG_SESSION_PATH
CSF_DrawPluginDefaults
I3SOCK
LC_ADDRESS
CSF_LANGUAGE
SSH_AUTH_SOCK
CSF_MIGRATION_TYPES
DESKTOP_SESSION
LC_MONETARY
SSH_AGENT_PID
CSF_OCCTResourcePath
CSF_STEPDefaults
CLOUDSDK_PYTHON_ARGS
PYENV_VERSION
GTK_MODULES
XDG_SEAT
PWD
XDG_SESSION_DESKTOP
LOGNAME
XDG_SESSION_TYPE
DRAWHOME
XAUTHORITY
CSF_StandardLiteDefaults
XDG_GREETER_DATA_DIR
VIRTUALENVWRAPPER_SCRIPT
HOME
LC_PAPER
LANG
LS_COLORS
XDG_CURRENT_DESKTOP
VIRTUAL_ENV
VTE_VERSION
CLOUDSDK_ROOT_DIR
VIRTUALENVWRAPPER_WORKON_CD
XDG_SEAT_PATH
CSF_ShadersDirectory
CSF_EXCEPTION_PROMPT
PYENV_DIR
CSF_XmlOcafResource
CLOUDSDK_PYTHON
WORKON_HOME
CSF_SHMessage
XDG_SESSION_CLASS
TERM
ZSH
GOOGLE_CLOUD_SDK_HOME
USER
CSF_StandardDefaults
CSF_IGESDefaults
VIRTUALENVWRAPPER_PROJECT_FILENAME
DISPLAY
CSF_XCAFDefaults
SHLVL
PAGER
LC_MESSAGES
LC_MEASUREMENT
XDG_VTNR
CSF_PluginDefaults
CSF_TObjMessage
XDG_SESSION_ID
CASROOT
XDG_RUNTIME_DIR
PYENV_ROOT
LC_TIME
CSF_XSMessage
MMGT_CLEAR
PATH
CSF_TObjDefaults
VIRTUALENVWRAPPER_HOOK_DIR
GDMSESSION
DBUS_SESSION_BUS_ADDRESS
MAIL
DRAWDEFAULT
OLDPWD
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/usr/share/pyenv/libexec:/home/adriano/.virtualenvs/pipenv2020/bin:/home/adriano/.yarn/bin:/home/adriano/.yarn/bin:/home/adriano/.config/yarn/global/node_modules/.bin:/home/adriano/.pyenv/shims:/home/adriano/.pyenv/bin:/home/adriano/.local/bin:/opt/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/adriano/.local/bin
SHELL
:/usr/bin/zsh
LANG
:en_US.UTF-8
PWD
:/home/adriano/playground/pipenv-2020-url-sanitation
VIRTUAL_ENV
:/home/adriano/.virtualenvs/pipenv2020
Contents of
Pipfile
('/home/adriano/playground/pipenv-2020-url-sanitation/Pipfile'):The text was updated successfully, but these errors were encountered: