Open souris4science opened 3 years ago
@souris4science Have you tried with pipenv==2022.1.8
? I expect it might be the same because subprocesses are used in the install and locking process, so I am not sure it is viable to popup a UI prompting you for your username and PW
@matteius I gave it a try today and the problem still occurs with pipenv==2022.1.8
.
Issue description
As mentioned in the documentation, you may inject credentials into the URL of a package as environment variables. But in case these variables do not exist, the user is not prompted for username and password, but instead the operation fails with authentication error. The problem occurred on windows 10 host with Python 3.8.6-64-bit and pipenv 2020.11.15.
Expected result
Non-existent env variables should be replaced with empty strings and a request to
https://:@github.com/myaccount/myproject.git
would pop-up a window asking the user to provide the username and password.Actual result
Package installation fails with authentication failure:
Steps to replicate
On Windows with the env variables
GITHUB_USER
andGITHUB_PASS
unset, run the following on an empty project:>py -3.8-64 -m pipenv install -e "git+https://${GITHUB_USER}:${GITHUB_PASS}@github.com/myaccount/myproject.git#egg=myproject"
$ pipenv --support
Pipenv version: `'2020.11.15'` Pipenv location: `'C:\\Users\\****\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\pipenv'` Python location: `'C:\\Users\\****\\AppData\\Local\\Programs\\Python\\Python38\\python.exe'` Python installations found: - `3.8.6`: `C:\Users\****\AppData\Local\Programs\Python\Python38\python.exe` - `3.7.0`: `C:\Program Files\Python37\python.exe` - `3.7.0`: `C:\Python37-32\python.exe` - `2.7.6`: `C:\Python27\python.exe` PEP 508 Information: ``` {'implementation_name': 'cpython', 'implementation_version': '3.8.6', 'os_name': 'nt', 'platform_machine': 'AMD64', 'platform_python_implementation': 'CPython', 'platform_release': '10', 'platform_system': 'Windows', 'platform_version': '10.0.17763', 'python_full_version': '3.8.6', 'python_version': '3.8', 'sys_platform': 'win32'} ``` System environment variables: - `ALLUSERSPROFILE` - `APPDATA` - `CHOCOLATEYINSTALL` - `CHOCOLATEYLASTPATHUPDATE` - `COMMONPROGRAMFILES` - `COMMONPROGRAMFILES(X86)` - `COMMONPROGRAMW6432` - `COMPUTERNAME` - `COMSPEC` - `DRIVERDATA` - `GIT_LFS_PATH` - `GROOVY_HOME` - `HOMEDRIVE` - `HOMEPATH` - `INTELLIJ IDEA COMMUNITY EDITION` - `LM_LICENSE_FILE` - `LOCALAPPDATA` - `LOGONSERVER` - `NUMBER_OF_PROCESSORS` - `ONEDRIVE` - `ONEDRIVECOMMERCIAL` - `OS` - `PATH` - `PATHEXT` - `PIPENV_MAX_DEPTH` - `PROCESSOR_ARCHITECTURE` - `PROCESSOR_IDENTIFIER` - `PROCESSOR_LEVEL` - `PROCESSOR_REVISION` - `PROG27B48B2C054` - `PROGRAMDATA` - `PROGRAMFILES` - `PROGRAMFILES(X86)` - `PROGRAMW6432` - `PROMPT` - `PSMODULEPATH` - `PUBLIC` - `PYCHARM EDU` - `QT_DEVICE_PIXEL_RATIO` - `REPS` - `SESSIONNAME` - `SYSTEMDRIVE` - `SYSTEMROOT` - `TEMP` - `TMP` - `UATDATA` - `USERDNSDOMAIN` - `USERDOMAIN` - `USERDOMAIN_ROAMINGPROFILE` - `USERNAME` - `USERPROFILE` - `VBOX_MSI_INSTALL_PATH` - `VS110COMNTOOLS` - `VS120COMNTOOLS` - `VS140COMNTOOLS` - `WINDIR` - `PIP_DISABLE_PIP_VERSION_CHECK` - `PYTHONDONTWRITEBYTECODE` - `PIP_SHIMS_BASE_MODULE` - `PIP_PYTHON_PATH` - `PYTHONFINDER_IGNORE_UNSUPPORTED` Pipenv–specific environment variables: - `PIPENV_MAX_DEPTH`: `5` Debug–specific environment variables: --------------------------- Contents of `Pipfile` ('C:\\Users\\****\\Documents\\workspace\\tmp\\Pipfile'): ```toml [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] [dev-packages] [requires] python_version = "3.8" ```