I am getting the following error when attempting to use a custom PositiveSSL wildcard certificate. It could well be that I’m using openssl req
To generate the private key and CSR:
time="2020-04-12T17:37:34Z" level=error msg="Error while creating certificate store: failed to load X509 key pair: tls: failed to parse private key" tlsStoreName=default
time="2020-04-12T17:37:34Z" level=error msg="Unable to append certificate -----BEGIN CERTIFICATE-----\r\n...<redacted>...\r\n-----END CERTIFICATE----- to store: unable to generate TLS certificate : tls: failed to parse private key" tlsStoreName=default
My traefik.yml includes:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /share/appdata/config/traefik:/etc/traefik
- /share/appdata/config/certs:/etc/traefik/certs:ro
networks:
- traefik_public
command: --configFile=/etc/traefik/traefik-static.yaml
My traefik-static.yaml includes:
entryPoints:
http:
address: ":80"
forwardedHeaders:
trustedIPs:
- "172.16.0.0/12"
- "10.0.0.0/8"
- "192.168.0.0/16"
http:
redirections:
entryPoint:
to: https
scheme: https
permanent: true
priority: 10
https:
address: ":443"
forwardedHeaders:
trustedIPs:
- "172.16.0.0/12"
- "10.0.0.0/8"
- "192.168.0.0/16"
http:
tls:
options: default
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
watch: true
swarmMode: true
network: traefik_public
file:
# Optional instead of directory:
filename: /etc/traefik/traefik-dynamic.yaml
watch: true
My traefik-dynamic.yaml includes:
tls:
certificates:
- certFile: /etc/traefik/certs/gkoerk_com.crt
keyFile: /etc/traefik/certs/gkoerk_com.key
stores:
- default
options:
default:
minVersion: VersionTLS12
maxVersion: VersionTLS13
stores:
default:
defaultCertificate:
certFile: /etc/traefik/certs/gkoerk_com.crt
keyFile: /etc/traefik/certs/gkoerk_com.key
Any ideas if I’ve got a permissions issue or a cert format problem?