Skip to content
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

Add VERIFY_SSL arg to conan_add_remote #228

Merged

Conversation

gordonread
Copy link
Contributor

This adds a VERIFY_SSL argument to the conan_add_remote function (We have a local conan repository that requires the verify ssl argument be false)

@CLAassistant
Copy link

CLAassistant commented May 4, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gordonread

It seems there is something wrong in this contribution. Possibly adding a test would have raised this error, could you please try to add such test?

Many thanks! (and sorry this took a while to review)

${CONAN_INDEX_ARG} -f)
set(CONAN_VERIFY_SSL_ARG "True")
if(DEFINED CONAN_VERIFY_SSL)
set(CONAN_VERIFY_SSL_ARG ${CONAN_VERIFY_SSL})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this is missing the --verify-ssl argument. In the same way the CONAN_INDEX_ARG introduces the -i ... argument, this will need this (note the other args as NAME, URL are positional instead)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this, for me, conan reports:

usage: conan remote add [-h] [-i [INSERT]] [-f] remote url [verify_ssl]
conan remote add: error: the following arguments are required: remote, url
ERROR: Exiting with code: 2

so this change simply sets ${CONAN_VERIFY_SSL_ARG} to either True or whatever the VERIFY_SSL parameter is set to if it's there, this value is then put on the end of the command (below) as per the help above - I can't see any mention of a --verify-ssl in the conan docs that I have.
Please correct me if I'm wrong.
I'll add a test as requested in your email though.
/Gordon

Copy link
Contributor

@czoido czoido Sep 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be ok, now the verify_ssl argument for conan remote add is positional: https://github.com/conan-io/conan/blob/29b04421a650560673db9e41a9d62060bda3dc90/conans/client/command.py#L1509-L1510
@gordonread I'm adding a test to check the changes and also updating the docs

@czoido czoido added this to the 0.16 milestone Sep 3, 2020
@memsharded memsharded merged commit aff58ee into conan-io:develop Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants