conan
conan copied to clipboard
[question] How to ignore certificate with "conan_build_info create"
Hello,
In my context, I have a on premise Artifactory using https but I want to ignore certificate check. In a usual conan use, my ~/.conan/remotes.json has [Verify SSL: False] attribute but when using "conan_build_info --v2 create buildinfo.json --lockfile updated.lock --user $CONAN_LOGIN_USERNAME --password $CONAN_PASSWORD " I get following error:
ERROR: HTTPSConnectionPool(host='artifactory.XXX.com', port=443): Max retries exceeded with url: /api/storage/conan//boost/1.69.0//dbe25b33fdddc843db3a8e68636af20c/export/conan_sources.tgz (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))
I don't know how conan_build_info find the Artifactory URL to use, is it from remotes.json? In that case, it should consider "Verify SSL" attribute, right?
And if it is the case, why we don't have conan_build_info use by default CONAN_LOGIN_USERNAME and CONAN_PASSWORD environment variables instead of --user and --password parameters? And same of --url parameter?
Regards.
Hi @EstebanDugueperoux2
Quick question: If I understand correctly, all the other operations with Conan, downloads, uploads, installs, from Conan repos, etc, work well, no HTTPS errors at all?
Because what is happening is that while trying to create the build-info, it is trying to access some of the artifacts in the repo, but it is failing. Those same artifacts are the one that would be downloaded in a conan install .. --build=boost for example, so I am trying to understand why it is failing here and not in Conan usage.
Hi @memsharded
Yes, all others operations with Conan works.
And what about CONAN_LOGIN_USERNAME and CONAN_PASSWORD environment variables?
Yes, the conan_build_info is an independent application, it practically doesn't share logic with the Conan client, so it will not be reading or using those variables. It assumes the necessary artifacts are already there.
In Conan 2.0 it will probably move to a custom command layer, and that will improve this integration. In the meantime, you need to make sure that the necessary artifacts are there to compute the build-info. You might achieve this with a conan upload --skip-upload.
Ok thanks, I will wait Coan 2.0. Regards.
Hi @memsharded,
I come back to this issue. I can workaround the TSL checking issue by setting http scheme instead of https in all of my remotes. But I'm interested if you have a ticket referencing the change in conan 2.0 about this custom command layer.
I reopen this issue about buildinfo.json. I can get a buildinfo.json with modules field non empty by calling "conan create ..." with correct parameters but If I break down "conan create" call into "conan install ..", "conan build ..." and "conan export-pkg" the buildinfo.json get a modules field empty. I'll try to reproduce this issue with a little example.
Regards.
Closing this ticket as outdated. BuildInfo creation got a new set of commands in conan-extensions repo for Conan 2.