-
-
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 #2389
Comments
Did you spell the variable wrong? |
No, I didn't, it sneaked in when I created the issue. I just did a second verification on it to be sure, and I can still reproduce, with the exception that I don't get it to work with netrc (as I thought I did initially). When I put the user/pass directly in the Pipfile it works as expected. Reproduced with: Pipfile:
Running:
|
Pipenv doesn’t parse netrc files, if that’s relevant; it only reads environment variables |
Don't mind netrc, that was merely a distraction of mine it seems. |
Based on the error I think it is residing the variable but downstream there is an expectation of these being separate and for security reasons we only interpolate at the last possible moment. The lack of a separator is potentially throwing things off. Can you try passing these in separately as |
I can reproduce this issue on release Update: I can reproduce this issue on release PS: I've spent some time to diagnostic this problem via running |
@shawnzhu the approach we recommend and have recommended is |
Passing them separately still gives the same issue: Pipfile
Command
Output
|
You should update your pipenv version, but I also can't replicate this at all -- /t/test2 cat Pipfile
[[source]]
url = "https://${FAKE_PYPI}/simple"
verify_ssl = false
name = "kenneth-mirror"
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.6"
This works with |
- Fixes #2459 and #2389 Signed-off-by: Dan Ryan <[email protected]>
- Fixes #2459 and #2389 Signed-off-by: Dan Ryan <[email protected]>
@techalchemy Do you expect the changes made in #2484 will fix my issue as well? |
Those are released so if it helps it will work in the newest release |
So I got around doing as suggested and updated pipenv version, and did a few tests to see where this started working. Fedora 28, Python 3.6.5, pip 9.0.3: Shame on me that I did not update to newest version before testing. It works well in the past couple of releases. |
When I add a second source in my Pipfile with a private pypi registry, and then try to run pipenv update (or anything else which tries to install from it), I'm getting an error.
I've found similar issue, both of which are closed:
#2351
#1906
If I set the username and password as part of the source url directly in the Pipfile it works as expected, also when I create a ~/.netrc file with the machine, login and password.
Expected result
I expect the packages defined in Pipfile to be installed
Actual result
When possible, provide the verbose output (
--verbose
), especially for locking and dependencies resolving issues.Steps to replicate
Pipfile
Command
env PYPI_AUTH="user:password" pipenv update
[Edit]: Updated Pipfile to fix spelling error.
The text was updated successfully, but these errors were encountered: