{"record":{"id":"80c63bcef0e93ef3","repo":"goharbor/harbor","slug":"no-bearer-challenge-found","errorCode":null,"errorMessage":"no bearer challenge found","messagePattern":"no bearer challenge found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/azurecr/auth.go","lineNumber":143,"sourceCode":"\n\tresp, err := a.client.Get(v2URL.String())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tchallenges := challenge.ResponseChallenges(resp)\n\tif len(challenges) == 0 {\n\t\treturn nil, errors.New(\"invalid response challenges\")\n\t}\n\tcm := map[string]challenge.Challenge{}\n\tfor _, challenge := range challenges {\n\t\tcm[challenge.Scheme] = challenge\n\t}\n\n\tchallenge, exist := cm[\"bearer\"]\n\tif !exist {\n\t\treturn nil, errors.New(\"no bearer challenge found\")\n\t}\n\n\ttokenURL, err := url.Parse(challenge.Parameters[\"realm\"])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := tokenURL.Query()\n\tquery.Add(\"service\", challenge.Parameters[\"service\"])\n\n\tvar repository string\n\tif subs := lib.V2TagListURLRe.FindStringSubmatch(u.Path); len(subs) >= 2 {\n\t\t// tag\n\t\trepository = subs[1]\n\t}\n\n\tif repository == \"\" {\n\t\treturn nil, errors.Errorf(\"invalid repository name, url: %s\", u.String())","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/azurecr/auth.go#L125-L161","documentation":"Error \"no bearer challenge found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/azurecr/auth.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}