{"id":"505b5b2f1d5288a5","repo":"docker/cli","slug":"failed-to-retrieve-context-tls-info-w","errorCode":null,"errorMessage":"failed to retrieve context tls info: %w","messagePattern":"failed to retrieve context tls info: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/context/docker/load.go","lineNumber":72,"sourceCode":"\t\t\treturn nil, errors.New(\"failed to retrieve context tls info: ca.pem seems invalid\")\n\t\t}\n\t\ttlsOpts = append(tlsOpts, func(cfg *tls.Config) {\n\t\t\tcfg.RootCAs = certPool\n\t\t})\n\t}\n\tif ep.TLSData != nil && ep.TLSData.Key != nil && ep.TLSData.Cert != nil {\n\t\tkeyBytes := ep.TLSData.Key\n\t\tpemBlock, _ := pem.Decode(keyBytes)\n\t\tif pemBlock == nil {\n\t\t\treturn nil, errors.New(\"no valid private key found\")\n\t\t}\n\t\tif x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design\n\t\t\treturn nil, errors.New(\"private key is encrypted - support for encrypted private keys has been removed, see https://docs.docker.com/go/deprecated/\")\n\t\t}\n\n\t\tx509cert, err := tls.X509KeyPair(ep.TLSData.Cert, keyBytes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to retrieve context tls info: %w\", err)\n\t\t}\n\t\ttlsOpts = append(tlsOpts, func(cfg *tls.Config) {\n\t\t\tcfg.Certificates = []tls.Certificate{x509cert}\n\t\t})\n\t}\n\tif ep.SkipTLSVerify {\n\t\ttlsOpts = append(tlsOpts, func(cfg *tls.Config) {\n\t\t\tcfg.InsecureSkipVerify = true\n\t\t})\n\t}\n\treturn tlsconfig.ClientDefault(tlsOpts...), nil\n}\n\n// ClientOpts returns a slice of Client options to configure an API client with this endpoint\nfunc (ep *Endpoint) ClientOpts() ([]client.Opt, error) {\n\tvar result []client.Opt\n\tif ep.Host != \"\" {\n\t\thelper, err := connhelper.GetConnectionHelper(ep.Host)","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/context/docker/load.go#L54-L90","documentation":"Error \"failed to retrieve context tls info: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/context/docker/load.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}