-
Notifications
You must be signed in to change notification settings - Fork 992
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
conan client prompts for username and password, even if the remote shows as [Authenticated] #5443
Comments
This is the expected behavior, |
Thank you for your reply. |
Could this case be similar to what https://github.com/conan-io/docs/pull/1349/files is documenting? The related issue is #5434 Is "Hide Existence of Unauthorized Resource" activated in the Artifactory server? In this case, this is the expected behavior, as they are basically opposite things. If the code is the same in both places, then developers should set their CONAN_PASSWORD too, to achieve the same behavior, otherwise they will be prompted. Please check the docs pending in that PR and tell if it makes sense. |
we have tested both with "Hide Existence of Unauthorized Resource" set and unset, and neither will trigger a prompt. |
yes, it also depends on the tasks, and the other permissions. As long as the server does not return an AuthenticationError, a prompt for credentials won't be triggered. There are some operations like search (necessary to resolve version ranges), that by default will return a list of available and allowed versions, but will not return a 404 because some specific version requires to be logged in, for example. |
is it possible to include the functionality if the remote is already Authenticated , it will not prompt for the password? |
It still feels a bit corner case. |
So I'm the developer having the underlying issue, triggering @hetaish to create this issue. We try to maintain a neat build workflow that should be identical between developers and CI. We do not wish to impose unnecessary requirement on developer workstations, so we don't wish to require the developers set up This works great for us as long as Anonymous access is disable in Artifactory. As soon as Anonymous access is enabled we lose the credential prompts from Conan, and everything falls apart. As I mention above, we do not wish to require the developers always have What we really need is either:
|
Thanks for the clarification. |
Ok, we've been discussing. We are introducing at the next release 1.18 the
|
Please @andersnp1 @hetaish confirm that it looks good for you. |
Thank you. If so, then this fulfills our requirements. Out of curiosity, how do you imagine this will work if username is also specified, and if this is different from the locally stored credentials? |
Correct If the username is specified and doesn't match with the stored one, it will launch the authentication. Only if the user is not specified or the specified user matches the stored, will skip the auth. |
Good, thank you 👍 |
Following up on this old ticket: As the
As a downside - starting with the latest Conan releases |
Hi @schwaerz This might require a new ticket to discuss. Have you tried the |
I tried to use |
I will create a new ticket. |
Environment
Current Conan Version: 1.16.1
Previous Working Conan Version: 1.12.3
Artifactory Version: 6.10.1
Issue:-
while triggering conan user -r <ARTIFACTORY_SERVER> -p command , the Conan client takes the credentials from environment variables, if they exist. This is true for both Anonymous Access enabled or disabled in artifactory.
Since we are running script locally, without environment variables, the client prompts for username and password, even if the remote shows as [Authenticated], due to running the command with the -p flag.
Please find the below exact steps:-
Even` if the remote in above is already authenticated it will again ask for credentials.
Expected Behavior
please include the functionality if the remote is already Authenticated , it will not prompt for the password.
The text was updated successfully, but these errors were encountered: