Failed to push image,Error:x509: certificate signed by unknown authority
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
The version information is as follows
buildkit v0.12.1
The content of my buildkitd.toml file is as follows
debug = true
[registry."local-repository.com"]
insecure = true
ca=["/etc/config/ca.crt"]
[[registry."local-repository".keypair]]
key="/etc/config/local-repository.com.key"
cert="/etc/config/local-repository.com.cert"
Execute the command as follows
buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=. --output type=image,name=local-repository.com/base/myapp,push=true,registry.insecure=true
The error message is as follows
error: failed to solve: failed to push local-repository.com/base/myapp: failed to do request: Head "https://local-repository.com/v2/base/myapp/blobs/sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc": tls: failed to verify certificate: x509: certificate signed by unknown authority
When I configure certificate trust at the operating system level, it is ok, but using the buildkitd.toml file returns the above error.
I wonder if there is something wrong with my configuration file or the command line,my certificate is self-signed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported buildkitd.toml registry configuration and the buildctl command, checking how the registry hostname, CA path, and keypair settings are interpreted for the push. Reproduce with the self-signed certificate and confirm that the configured CA is honored without OS-level trust, with a successful image push as the done condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- build-system, devops, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100