git2consul icon indicating copy to clipboard operation
git2consul copied to clipboard

How to configure parameters to use consul with HTTPS?

Open hugree opened this issue 7 years ago • 1 comments

The documentation and examples don't help much here.

There's a mention of a --secure parameter but without any info.

I had to look deep in the sourcecode to find out that it's a true/false parameter.

This doesn't give me any options to pass the consul server SSL certificate.

Same goes for the endpoint. I have no idea if I should include https in front or not.

Without https I get the following error

{"message":"self signed certificate","name":"Error","stack":"Error: self signed certificate\n at Error (native)\n at TLSSocket. (_tls_wrap.js:936:36)\n at TLSSocket.emit (events.js:104:17)\n at TLSSocket._finishInit (_tls_wrap.js:467:8)","code":"DEPTH_ZERO_SELF_SIGNED_CERT"},"msg":"self signed certificate","time":"2018-03-12T15:52:25.463Z","v":0}

Has anyone successfully configured git2consul with a HTTPS consul backend?

hugree avatar Mar 12 '18 15:03 hugree

A bit late to the party but we fixed this problem on our side through the env variable export :

NODE_TLS_REJECT_UNAUTHORIZED: 0

Founded on https://stackoverflow.com/a/21961005.

Valdec avatar Nov 20 '18 11:11 Valdec