Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to parse private key #353

Open
SeanOMik opened this issue Nov 5, 2022 · 0 comments
Open

Failing to parse private key #353

SeanOMik opened this issue Nov 5, 2022 · 0 comments

Comments

@SeanOMik
Copy link

SeanOMik commented Nov 5, 2022

I'm getting an error when I try to start a docker_auth docker container:

Failed to load config: failed to load server cert and key: tls: failed to parse private key

This is my docker_auth configuration:

server:
  addr: ":5001"
  certificate: "/cert/cert.pem"
  key: "/cert/key.pem"

token:
  issuer: "Acme auth server"  # Must match issuer in the Registry config.
  expiration: 900

users:
  # Password is specified as a BCrypt hash. Use `htpasswd -nB USERNAME` to generate.
  "seanomik":
    password: "REDACTED"

acl:
  - match: {account: "seanomik"}
    actions: ["*"]
    comment: "Has full access to everything."
  - match: {account: "/.+/"}
    actions: ["push", "pull"]
    comment: "Logged in users can push and pull."
  - match: {account: ""}
    actions: ["pull"]
    comment: "Anonymous users can only pull."

And this is the docker-compose:

version: "3.5"

services:
  auth:
    image: cesanta/docker_auth:1
    ports:
      - 5001:5001
    volumes:
      - ./auth_config.yml:/config/auth_config.yml:ro
      - ./logs/auth:/logs

      - ./cert:/cert
    command: --v=2 --alsologtostderr /config/auth_config.yml

The .cert directory has key.pem and cert.pem which I generated with this openssl command:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant