-
-
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
Injecting different type of credentials when installing private repositories #6233
Comments
I'm glad you figured out a way to get it to work @rick2ricks -- ideally we can improve this to make it more resilient to different patterns. Also, In the case that you had it work, does the |
Hi, thanks for the response. At my Pipfile.lock does not appear any credentials, it shows like the following:
But it would be a nice add if we could replace any part of the string. Best regards. |
Analysis of Pipenv Issue #62331. Problem Summary: The issue highlights a problem with Pipenv's handling of environment variables within VCS URLs in the Pipfile. While using an environment variable to define the entire repository URL works, substituting only parts of the URL (e.g., just the username/password or just the protocol) results in an 2. Comment Analysis:
3. Proposed Resolution: The core issue lies in Pipenv's dependency parsing logic. It currently lacks the ability to recognize and handle environment variable placeholders within individual components of a VCS URL. Here's a potential solution:
4. Code Snippet: def install_req_from_pipfile(name, pipfile):
# ... (Existing Code) ...
if vcs:
vcs_url = _pipfile[vcs]
# Expand environment variables within the URL components
vcs_url = os.path.expandvars(vcs_url)
# ... (Rest of the code) ...
# ... (Rest of the code) ... 5. Additional Steps:
This issue highlights the need for Pipenv to handle environment variables more intelligently within Pipfile, providing users with greater flexibility while maintaining security and clarity. ================================================== |
@rick2ricks could you check if this PR fixes it: #6276 |
When installing private repositories I would like to replace the authentication method between ssh and user password using environment variables as following:
But this will raise:
The only way I could get it to work was replacing the whole string:
Am I missing something or this is the desired behaviour?
The text was updated successfully, but these errors were encountered: