{"id":"0c153e65bd8f5f91","repo":"docker/cli","slug":"login-attempt-to-s-failed-with-status-d-s","errorCode":null,"errorMessage":"login attempt to %s failed with status: %d %s","messagePattern":"login attempt to (.+?) failed with status: (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/registry/auth.go","lineNumber":70,"sourceCode":"\t\tcredentialAuthConfig = *authConfig\n\t\tcreds                = loginCredentialStore{authConfig: &credentialAuthConfig}\n\t)\n\n\tloginClient, err := v2AuthHTTPClient(endpoint.URL, authTrans, modifiers, creds, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tresp, err := loginClient.Do(req)\n\tif err != nil {\n\t\terr = translateV2AuthError(err)\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\t// TODO(dmcgowan): Attempt to further interpret result, status code and error code string\n\t\treturn \"\", fmt.Errorf(\"login attempt to %s failed with status: %d %s\", endpointStr, resp.StatusCode, http.StatusText(resp.StatusCode))\n\t}\n\n\treturn credentialAuthConfig.IdentityToken, nil\n}\n\nfunc v2AuthHTTPClient(endpoint *url.URL, authTransport http.RoundTripper, modifiers []transport.RequestModifier, creds auth.CredentialStore, scopes []auth.Scope) (*http.Client, error) {\n\tchallengeManager, err := PingV2Registry(endpoint, authTransport)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tauthHandlers := []auth.AuthenticationHandler{\n\t\tauth.NewTokenHandlerWithOptions(auth.TokenHandlerOptions{\n\t\t\tTransport:     authTransport,\n\t\t\tCredentials:   creds,\n\t\t\tOfflineAccess: true,\n\t\t\tClientID:      AuthClientID,\n\t\t\tScopes:        scopes,","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/internal/registry/auth.go#L52-L88","documentation":"Error \"login attempt to %s failed with status: %d %s\" thrown in docker/cli.","triggerScenarios":"Thrown at internal/registry/auth.go:70 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}