cdrx / rancher-gitlab-deploy

Painless deployment of projects built with GitLab CI onto your Rancher infrastructure
MIT License
432 stars 90 forks source link

Self Signed Certificate #44

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi.

We have an internal rancher deployment under https with a self-signed htttps certificate.

When we use your image we recieve the error "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed"

There is any way to avoid this whitout using a valid certificate or exposing the rancher url under http?

cdrx commented 6 years ago

This isn't supported at the moment, currently you either need a valid certificate or have to use http

ghost commented 6 years ago

Understood.

Thanks.

rtorrero commented 6 years ago

This should be fairly easy to implement, right? Would you be interested in adding --no-ssl-verify as a cmdline option? If so, I can send a PR to add it.

cdrx commented 6 years ago

Yeah, it would be worth adding I think -- its documented here:

http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

rtorrero commented 6 years ago

@Cobra1978 I just did a quick modification to implement a --no-ssl-verify option, if you use the docker image would you mind checking if it allows you to use your self-signed certificate now?

docker pull rtorrero/rancher-gitlab-deploy

The code itself, in case you don't use the docker image is here: https://github.com/rtorrero/rancher-gitlab-deploy/commit/356d640db40b358e7443feb61c694b416d297a43

ghost commented 6 years ago

Hi.

I use the docker image, so i plan to make some thest today or at least tomorrow.

Thanks.

ghost commented 6 years ago

@rtorrero

I can confirm that with your modification it works flawlessy even with https and self-signed certs.

Thank You.

rtorrero commented 6 years ago

You are welcome, I'll clean up and prepare the PR :)

noudAndi commented 6 years ago

Hi there, thanks a lot for adding this feature! 👍

Just to leave a hint, for all who are using an own CA.

you can just do:

export REQUESTS_CA_BUNDLE=/path/to/public/ca/file.crt
upgrade <all the parameters you want>
cdrx commented 6 years ago

Thanks!