conan icon indicating copy to clipboard operation
conan copied to clipboard

[question] How to ignore certificate with "conan_build_info create"

Open EstebanDugueperoux2 opened this issue 3 years ago • 5 comments

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.

EstebanDugueperoux2 avatar May 27 '22 08:05 EstebanDugueperoux2

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.

memsharded avatar May 27 '22 10:05 memsharded

Hi @memsharded

Yes, all others operations with Conan works.

And what about CONAN_LOGIN_USERNAME and CONAN_PASSWORD environment variables?

EstebanDugueperoux2 avatar May 30 '22 05:05 EstebanDugueperoux2

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.

memsharded avatar May 30 '22 09:05 memsharded

Ok thanks, I will wait Coan 2.0. Regards.

EstebanDugueperoux2 avatar Jun 02 '22 10:06 EstebanDugueperoux2

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.

EstebanDugueperoux2 avatar Sep 19 '22 08:09 EstebanDugueperoux2

Closing this ticket as outdated. BuildInfo creation got a new set of commands in conan-extensions repo for Conan 2.

memsharded avatar Mar 15 '24 23:03 memsharded