I'm trying to authenticate a user on Ubuntu 16.04 and it just won't work. I am able to run the same commands on MacOS with no issues.
Ubuntu 16.04
$ conan --version
Conan version 1.11.1
$ export CONAN_TRACE_FILE=/tmp/conan_trace.log
$ conan user redacted -r conan-hosted -p redacted
ERROR: Wrong user or password. [Remote: conan-hosted]
$ cat /tmp/conan_trace.log
{"_action": "COMMAND", "name": "authenticate", "parameters": {"password": "**********", "remote_name": "conan-hosted"}, "time": 1545429064.6550703}
{"_action": "COMMAND", "name": "get_remote_by_name", "parameters": {}, "time": 1545429064.656373}
{"_action": "REST_API_CALL", "duration": 0.01650261878967285, "headers": {"Authorization": "**********", "User-Agent": "Conan/1.11.1 (Python 3.5.2) python-requests/2.21.0", "X-Client-Anonymous-Id": "**********", "X-Conan-Client-Version": "1.11.1"}, "method": "GET", "time": 1545429064.6743445, "url": "https://example.com/repository/conan-hosted/v1/ping"}
{"_action": "REST_API_CALL", "duration": 0.0386805534362793, "headers": {"Authorization": "**********", "User-Agent": "Conan/1.11.1 (Python 3.5.2) python-requests/2.21.0", "X-Client-Anonymous-Id": "**********", "X-Conan-Client-Version": "1.11.1"}, "method": "GET", "time": 1545429064.7132957, "url": "https://example.com/repository/conan-hosted/v1/users/authenticate"}
{"_action": "EXCEPTION", "class": "AuthenticationException", "message": "Wrong user or password. [Remote: conan-hosted]", "time": 1545429064.713766}
$ curl https://example.com/repository/conan-hosted/v1/users/authenticate
ConanToken.c093e53a-d6a9-3515-bfd4-943c527db625
I have done an apt upgrade and update and get the same thing. Verified openssl-client and ca-certificate packages are up to date. Installed conan latest and version 1.10.2 using pip then tried .deb file, same issue.
I don't have any idea why Ubuntu 16.04 is not working or what to try next. Any help on what to try next would be greatly appreciated.
MacOS
$ conan --version
Conan version 1.10.2
$ export CONAN_TRACE_FILE=/tmp/conan_trace.log
$ conan user redacted -r conan-hosted -p redacted
Changed user of remote 'conan-hosted' from 'None' (anonymous) to 'jenkins'
$ cat /tmp/conan_trace.log
{"_action": "COMMAND", "name": "authenticate", "parameters": {"password": "**********", "remote_name": "conan-hosted"}, "time": 1545428813.972219}
{"_action": "COMMAND", "name": "get_remote_by_name", "parameters": {}, "time": 1545428813.973527}
{"_action": "REST_API_CALL", "duration": 0.2856881618499756, "headers": {"Authorization": "**********", "User-Agent": "Conan/1.10.2 (Python 3.7.1) python-requests/2.21.0", "X-Client-Anonymous-Id": "**********", "X-Conan-Client-Version": "1.10.2"}, "method": "GET", "time": 1545428814.260664, "url": "https://example.com/repository/conan-hosted/v1/ping"}
{"_action": "REST_API_CALL", "duration": 0.05597710609436035, "headers": {"Authorization": "**********", "User-Agent": "Conan/1.10.2 (Python 3.7.1) python-requests/2.21.0", "X-Client-Anonymous-Id": "**********", "X-Conan-Client-Version": "1.10.2"}, "method": "GET", "time": 1545428814.317323, "url": "https://example.com/repository/conan-hosted/v1/users/authenticate"}
$ curl https://example.com/repository/conan-hosted/v1/users/authenticate
ConanToken.c093e53a-d6a9-3515-bfd4-943c527db625
MacOS worked like a charm with no issues.
To help us debug your issue please explain:
Hi @dhoer
I cannot think of any reason this could fail. Maybe the terminal is capturing some special character in an unwanted way.
Is that Ubuntu machine able to login to other remotes? A simple test would be to launch a local conan_server (included with conan, configure user/password in the server.conf file), and try against that local server.
Please also, try to make sure the local cache DB is clean $ conan user --clean
A possibility would be trying to authenticate using the env-var CONAN_PASSWORD (https://docs.conan.io/en/latest/reference/env_vars.html#conan-password-conan-password-remote-name) (also CONAN_LOGIN_USERNAME).
What is your remote? Artifactory, conan_server?
I'm experiencing the same issue
Linux keeps asking for the password although I configured the correct credentials using conan user
and on Mac it works Like a charm
Ubuntu 16.04
Conan version 1.11.0
Mac OSX 10.13.6
Conan version 1.11.0
Another common thing is we, me and @dhoer, both try to use Nexus Conan repository:
https://stackoverflow.com/questions/53876769/nexus3-conan-login-error-wrong-user-or-password
PS: I've managed to upload to JFrog OSS Conan repo on Ubuntu 16
Hi @doronAtuar
Thanks for the feedback.
I've managed to upload to JFrog OSS Conan repo on Ubuntu 16
Then, I think this might be an issue of the Nexus plugin, I think it totally makes sense to report this to their repo, so they can check: https://github.com/sonatype-nexus-community/nexus-repository-conan
I am going to keep this open at the moment, please try to report to the nexus repo and tell us. Thanks!
The problem was environment related on my side. This is now fixed for me. Thank you for your help.
No problem, thanks for following up!
Hello @dhoer, would you mind sharing how you fixed the problem please?
@giladreich I'm embarrassed to say, but here it goes; The URL was pointing to a Jenkins server instead of Nexus. Jenkins was giving a response to the login attempt.
Not embarrassing, at least it is something that I'd easily do too 馃槃
Thanks for sharing! Well I seem to have the same issue with authentication but not the same direction of your solution and googling brought me here.
When I start a local server using JForg and conan, I can upload to the remote with no problem.
I've been experimenting with Bintray and it seem like I can't get conan to authenticate with their remote and conan keeps saying wrong username or password.
Pretty similar to the issue Diego had on this webinar:
https://youtu.be/Aey_O86mSfg?list=PLDwf9d3YRfPE0e5gfeP4JDH4vQNN-dUYw&t=2135
But even if I run conan user --clean and re-try to authenticate, it wouldn't accept my password. I even tried changing to simpler password on bintray side and also tried setting environment variables to usename and password so conan would pick it automatically. The password is 100% correctly typed.
I have the same issue with conan 1.11 and tried to upgrade to conan 1.2 and still same problem.
Using windows 10 here.
I guess to reproduce this issue, it requires creating a new free account on bintray and then creating a repo there and try to authenticate it.
Most helpful comment
@giladreich I'm embarrassed to say, but here it goes; The URL was pointing to a Jenkins server instead of Nexus. Jenkins was giving a response to the login attempt.