conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.25k stars 980 forks source link

[bug] conan asks for username/password for installing a recipe from conan-center #5962

Closed jjcasmar closed 3 years ago

jjcasmar commented 5 years ago

I am trying to install some recipes usis conan install <recipe> command and conan asks for username/password even for recipes from conan-center remote.

The output of the install command is the following:

 kdab@archlinux  ~/  conan install eigen/3.3.7@conan/stable --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

eigen/3.3.7@conan/stable: Not found in local cache, looking in remotes...
eigen/3.3.7@conan/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt: 100%|##########| 165/165 [00:00<00:00, 160kB/s]
Downloading conanfile.py: 100%|##########| 2.43k/2.43k [00:00<00:00, 1.29MB/s]
Downloading conan_export.tgz: 100%|##########| 766/766 [00:00<00:00, 1.42MB/s]
Decompressing conan_export.tgz: 100%|##########| 766/766 [00:00<00:00, 411kB/s]
eigen/3.3.7@conan/stable: Downloaded recipe revision 0
Installing package: eigen/3.3.7@conan/stable
Requirements
    eigen/3.3.7@conan/stable from 'conan-center' - Downloaded
Packages
    eigen/3.3.7@conan/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download

eigen/3.3.7@conan/stable: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conan-center'
Downloading conanmanifest.txt: 100%|##########| 42.3k/42.3k [00:00<00:00, 1.09MB/s]
Downloading conaninfo.txt: 100%|##########| 150/150 [00:00<00:00, 334kB/s]
Please log in to "conan-center" to perform this action. Execute "conan user" command.
If you don't have an account sign up here: https://bintray.com/signup/oss
Remote 'conan-center' username:

The output of conan user is

Current user of remote 'conan-center' set to: 'None' (anonymous)

and the output of conan remote list is

conan-center: https://conan.bintray.com [Verify SSL: True]

If I try to use my bintray username/password, they are rejected. If I log into the remote using the apikey using conan user -p <APIKEY> -r conan-center <USERNAME> I can succesfully log into it, but I still can't install the package.

I am using archlinux with conan 1.19.2 and python 3.7.4

There is a stackoverflow question related to this bug: https://stackoverflow.com/questions/58513773/unable-to-install-conan-package-eigen?noredirect=1#comment103379751_58513773

memsharded commented 5 years ago

Hi @jjcasmar

Certainly, conan-center shouldn't ask for credentials, anonymous should work. I have just tried here (in Windows, python 3.7, but with your exact profile, to install binary 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9) and it works. In fact what you are experiencing is very weird, because it works, the output shows that things are being retrieved from conan-center without issues, but at the end of the command only for the .tgz file, then it ask for credentials?

Please try the following:

Try again then, and tell me, just in case it was a temporary glitch in the Bintray Conan-center repo. Thanks!

jjcasmar commented 5 years ago

Hi @memsharded

I have already tried conan user --clean and I am already using 1.19.2. I am not sure how to see my python dependencies. Can you guide me on this?

Thanks

memsharded commented 4 years ago

Hi @jjcasmar

This was apparently due to some issues in Bintray (Conan-center). They should be resolved now, could you please check again and report? Sorry for the delay, thanks very much.

Gollum999 commented 3 years ago

I ran into a similar issue today when using Conan through WSL. Details:

Environment

Steps to reproduce

$ conan install ../..                                                                                                                                                                                                                                                   Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

boost/1.74.0: Not found in local cache, looking in remotes...
boost/1.74.0: Trying with 'conan-center'...
Please log in to "conan-center" to perform this action. Execute "conan user" command.
If you don't have an account sign up here: https://bintray.com/signup/oss
Remote 'conan-center' username:

I have tried creating an account at the specified link, but entering the password here gives ERROR: Wrong user or password. [Remote: conan-center]. Same error if I use conan user -p.

Here's my conan remote list:

conan-center: https://conan.bintray.com [Verify SSL: True]

Interestingly, if I use conan user -p and I leave the username and password blank, I get the following response:

ERROR: b'\r\n<html>\r\n<head>\r\n    <meta name="layout" content="mainError">\r\n    <link rel="shortcut icon" href="https://www.bintray.com/favicon.ico"/>\r\n    <title>Bintray Message</title>\r\n</head>\r\n\r\n<body>\r\n\r\n<div class="container">\r\n    <div class="error-page-bar">\r\n        <h1>You\'ve reached a dark spot...</h1>\r\n        <a id="sales_force_feedback"\r\n           data-toggle="modal"\r\n           data-target="#salesForceFeedbackModal">\r\n            Report an issue\r\n        </a>\r\n        |\r\n        <a href="/">Return to Bintray</a>\r\n    </div>\r\n\r\n    <div data-widget="breakout" data-code="oops" data-root="/"></div>\r\n</div>\r\n\r\n\n<!-- Modal -->\n<div class="modal fade" id="salesForceFeedbackModal"\n     tabindex="-1"\n     role="dialog"\n     aria-labelledby="salesForceFeedbackModal" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content" style="border-radius: 10px;">\n            <div class="modal-body no-padding">\n                <div class="modal-close-btn" onclick="$(\'#salesForceFeedbackModal\').modal(\'hide\');"\n                     style="top: 0; left: inherit; right: 1%; color: black">\n                    <i class="hidden-xs fa fa-times" aria-hidden="true"></i>\n                </div>\n                \n                <iframe id="salesForceFeedbackIframe"\n                        seamless\n                        src="https://jfrog-support.secure.force.com/communityfeedbackPopup">\n                </iframe>\n            </div>\n        </div>\n    </div>\n</div>\n<script>\n    $(function () {\n\n        if (window.addEventListener) {\n            // For standards-compliant web browsers\n            window.addEventListener("message", receiveIframeMessageFromFeedbackModal, false);\n        } else {\n            window.attachEvent("onmessage", receiveIframeMessageFromFeedbackModal);\n        }\n\n        function receiveIframeMessageFromFeedbackModal(event) {\n            var origin = event.origin || event.originalEvent.origin;\n\n            if (origin !== "https://jfrog-support.secure.force.com") return;\n\n            var eventData = event.data;\n            var iframe = $("#salesForceFeedbackIframe");\n            if (eventData.status) {\n                $(\'#salesForceFeedbackModal\').modal(\'hide\');\n                showhideUserAlertMessageBox(\'notice\', \'Thank you for your request.<br/> We will respond as soon as possible.\');\n\n\n            } else if (eventData.scrollHeight) {\n                var scrollHeight = eventData.scrollHeight;\n                if (scrollHeight > iframe.css(\'height\')) {\n                    iframe.css(\'height\', scrollHeight);\n                }\n            }\n        }\n\n        $(\'#salesForceFeedbackModal\').on(\'hidden.bs.modal\', function () {\n            var iframe = $(\'#salesForceFeedbackIframe\');\n            iframe.attr(\'src\', $(\'#salesForceFeedbackIframe\').attr(\'src\'));\n        })\n    })\n</script>\r\n\r\n</body>\r\n\r\n</html>\r\n'

Invalid server response, check remote URL and try again. [Remote: conan-center]

Everything works as expected with the same project if I use CMD + VS (with a separate Conan install, v1.31.2) instead of WSL + gcc/clang.

Gollum999 commented 3 years ago

As a workaround, I was able to avoid the above issue by switching to WSL 2.

solvingj commented 3 years ago

@jjcasmar may we close this issue?

jjcasmar commented 3 years ago

I havent tested it since a long time. Close it and if I have the issue again, I will open it.

p3rs30 commented 5 months ago

conancenter is asking for username and password when trying to download from it. Using conan 1.62.0 (per project needs) in python 3.11 I can see the same issue using conan 2.3.0 in python 3.11

I have deleted .conan and .conan2 folders just before trying in both cases.

I'm trying to download libcurl/8.6.0

I can perform conan search libcurl/8.6.0 without any problem.

Any clue on how to solve it?

memsharded commented 5 months ago

Hi @p3rs30

Thanks for telling. I have just tried and it seems to be working fine locally, I am not sure what could be failing in your case.

Can you please try in Conan 2: conan list zlib:* -r=conancenter and report? Then conan install --requires=zlib/1.3 -r=conancenter and report? Also just in case conan remote list and conan version (in Conan 2) and report. Thanks.

p3rs30 commented 5 months ago

conan version

version: 2.3.0 conan_path: C:\XXXX\XXXX\XXXX\XXXX\conan_venv_2\Scripts\conan python version: 3.11.9 sys_version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] sys_executable: C:\Users\XXXXX\XXXX\XXXXX\conan_venv_2\Scripts\python.exe is_frozen: False architecture: AMD64 system version: 10.0.19045 platform: Windows-10-10.0.19045-SP0 system: Windows release: 10 cpu: Intel64 Family 6 Model 140 Stepping 1, GenuineIntel

conan remote list

conancenter: https://center.conan.io [Verify SSL: False, Enabled: True] `

conan list zlib:* -r=conancenter

Works fine, omitting output cause it is quite long and I don't think it is useful

conan install --requires=zlib/1.3 -r=conancenter

======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=14 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

Profile build: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=14 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

======== Computing dependency graph ======== zlib/1.3: Not found in local cache, looking in remotes... zlib/1.3: Checking remote: conancenter Please log in to "conancenter" to perform this action. Execute "conan remote login" command. Remote 'conancenter' username:

memsharded commented 5 months ago

No idea what it could be, other quick questions:

p3rs30 commented 5 months ago
memsharded commented 5 months ago

Yes, I'm in a corporate network, Ive talked with them and they tell me they are whitelisting center.conan.io, but nonetheless, I'm going through a vpn. Is this a known issue that I could report to them?

As long as IT allow the center.conan.io domain it should be good, but I don't know in which part the blocker could be.

In my personal computer I don't have any issue, so perhaps this is in fact caused by the vpn.

Yes, that reinforces the idea that it would be a corporate network thing, either vpn/proxy or zscaler or similar. I am sorry I cannot help much from here, I think you need the support from your IT department to sort this out.