Greetings and I take this opportunity to applaud the efforts made to continue making the Incus project a success.
Personally, I am writing a wrapper API that will consume the incus API remotely on another host rather than the usual Unix socket way and I got into an error where I needed guidance and help to resolve it quicker.
I generated certificates from the Incus server (VirtualBox Ubuntu 22.04 VM) using incus remote generate-certificate and securely copied them to use them from a Go API running locally (Windows 11).
The environment variables are set to paths pointing to the client.crt and server.crt certificates together with the client.key within the same root folder of the project as shown in the screenshot.
When attempting to make the incus.ConnectIncus(remoteUrl, config) call it fails with this error stating: tls: failed to find any PEM data in certificate input and I have provided all of them in the environment variables as paths.
Its correct that reading the file using os.ReadFile and converting to string worked and eventually the Incus client was able to communicate with the remote host.