[bug] conan asks for password when CONAN_NON_INTERACTIVE=True
See original GitHub issueThis issue surfaced when our artifactory instance slowed down. Most probably the token stored in conan.db expired, and caused this.
password and username are also present in environment.
Environment Details (include every applicable attribute)
- Operating System+version: ubuntu focal
- Compiler+version: n/a
- Conan version: 1.48
- Python version: 3.8
Steps to reproduce (Include if Applicable)
- pull dependencies from remote (authenticate)
- wait for auth token to expire
- try upload with CONAN_NON_INTERACTIVE
Logs (Executed commands with output) (Include/Attach if Applicable)
/usr/local/bin/conan upload MyPackage/1.0 --no-overwrite recipe --all --remote remote --confirm --retry 4 --retry-wait 10
Uploading to remote 'remote':
Uploading MyPackage/1.0 to remote 'remote'
Please log in to "remote" to perform this action. Execute "conan user" command.
Please enter a password for "uploader_accnt" account:
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[bug] conan install asks for user password #6268 - GitHub
Since conan 1.21.0 (or maybe 1.20), conan install sometimes asks for a password when it should download packages from our internal conan server....
Read more >conan user — conan 1.53.0 documentation
Authenticates against a remote with user/pass, caching the auth token. Useful to avoid the user and password being requested later.
Read more >conan download Fails With 'Please enter a password'
Problem. When attempting to download a component through a conan proxy repository the client repeatedly requests a password.
Read more >[RTFACT-26854] Conan authentication fails after updating ...
What is the expected behavior: Updating the group should not remove credentials on conan client when the group is updated.
Read more >Conan does not find packages since GitLab update to 13.11.1
Considering an conan-auth-bug package exists on the channel. run conan user -c ... Conan should prompt for some credentials but does not.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, the issue is a false positive, process that ran conan, cleaned up all environment variables, including the non-interaction one
yes, but that is an “out”, that is not a problem, it should not error. But the actual “input”, in
input_user, input_password = self._user_io.request_login(remote.name, user)
is the thing that is protected by the non-interactive and should raise. The surprising thing is that it is not raising an error.