-
Notifications
You must be signed in to change notification settings - Fork 986
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
[feature] Better support for local & CI workflow for conan remote login
#17365
Comments
Hi @schwaerz Thanks for your suggestion. I have been reviewing this, but so far it seems that this is how the
I have added an extra check in #17374, to validate that when the user is authenticated and the token is valid, it will not request credentials to the user again. |
@memsharded Thanks for the update. I will need to try with |
Great, looking forward your feedback. |
Unfortunately it does not seem to work for me. I executed the following using conan 2.9.3 on my local machine. Conan did not ask for username and / or password: schwaerz@localhost:~/repositories/c-lib$ ./pdm.sh run conan remote auth conan-css-iphub-local
conan-css-iphub-local:
user: schwaerz
schwaerz@localhost:~/repositories/c-lib$ ./pdm.sh run conan remote logout conan-css-iphub-local
Changed user of remote 'conan-css-iphub-local' from 'schwaerz' (authenticated) to 'None' (anonymous)
schwaerz@localhost:~/repositories/c-lib$ ./pdm.sh run conan remote auth conan-css-iphub-local
conan-css-iphub-local:
user: None |
I just tried enabling some debug logging. However it looks like the |
I am a bit surprised about that. I have tried to add a new test to the PR (90437b9), you can check it, but also tried locally against a real ArtifactoryCE server:
|
Could this be possibly related to some specific settings on the Artifactory remote? |
It seems there is something different in your setup, I don't see the |
I will try some debugging. |
It might be. Maybe if the repo allows anonymous reads, then it doesn't really need auth, so the |
The repo does not allow anonymous access. However the
|
I did not find the documentation for this REST call. Probably you have a link so I could check with our Artifactory guys what's going on? |
What I found: curl -I -H "Authorization: Bearer foo" https://artifactory.url/artifactory/api/conan/conan-css-iphub-local/v2/users/check_credentials If I then use a valid token, I will get a 200: curl -I -H "Authorization: Bearer {my-valid-token}" https://artifactory.url/artifactory/api/conan/conan-css-iphub-local/v2/users/check_credentials |
So maybe this can be fixed in conan after all? |
|
following could be a workaround: If we set token to something other than However I am not sure how to test this properly - or whether you would accept a PR doing that? Maybe this would have other implications I currently cannot see? |
@memsharded As it took not much time to come up with a quick fix, I gave it a shot. |
I am afraid we don't have any documentation of the http rest api, just the code (both client and server side)
But if it is not a server side different configuration, why the unitttest linked in the PR will work, and the |
I cannot tell. But what I can see is that the |
@memsharded Another question wrt to this: Do you believe it makes sense to create a ticket wrt the the 200 response of |
Just in case, in my local Artifactory
|
Let me try to get some local server running. |
Works like a charm with Artifactory CE version 7.63.12
|
Implemented in #17377 for next Conan 2.10, with |
What is your suggestion?
Following up on #5443:
It looks like what was implemented back then is no longer available or did not make it into the final Conan 2.x release.
What would be very useful to us (to reduce the required scripting in every repository):
Have one
conan remote ...
command toCONAN_LOGIN_USERNAME
andCONAN_PASSWORD
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: