[Solved] [CLI] Failed to login on our server: "reason: unable to verify the first certificate"


#1

Hi! We’re facing this issue when trying to connect to our instance of Bitwarden with the command-line tool:

$ bw login [email protected]
? Master password: [hidden]
request to https://bitwarden.mycompany.net/api/accounts/prelogin failed, reason: unable to verify the first certificate

The only “extrange” thing that we are doing is that the server is using a wildcard certificate:
CN = *.mycompany.net

Any ideas? Thanks!


#2

OK, solved it. It’s the same problem described here:

And the solution proposed by andre1808 here:

Basically cat cert chain >> certificate.crt , makes it work.

I guess that this should be documented somewhere on the https://help.bitwarden.com/article/install-on-premise document, what do you think @kspearrin ?