diff --git a/integrations/api_packages_container_test.go b/integrations/api_packages_container_test.go
index a8f49423e2..2b5be9dd4c 100644
--- a/integrations/api_packages_container_test.go
+++ b/integrations/api_packages_container_test.go
@@ -66,10 +66,7 @@ func TestPackageContainer(t *testing.T) {
 			Token string `json:"token"`
 		}
 
-		authenticate := []string{
-			`Bearer realm="` + setting.AppURL + `v2/token"`,
-			`Basic`,
-		}
+		authenticate := []string{`Bearer realm="` + setting.AppURL + `v2/token"`}
 
 		t.Run("Anonymous", func(t *testing.T) {
 			defer PrintCurrentTest(t)()
diff --git a/routers/api/packages/container/container.go b/routers/api/packages/container/container.go
index 08b6b421b0..2a564b3446 100644
--- a/routers/api/packages/container/container.go
+++ b/routers/api/packages/container/container.go
@@ -113,7 +113,6 @@ func apiErrorDefined(ctx *context.Context, err *namedError) {
 func ReqContainerAccess(ctx *context.Context) {
 	if ctx.Doer == nil {
 		ctx.Resp.Header().Add("WWW-Authenticate", `Bearer realm="`+setting.AppURL+`v2/token"`)
-		ctx.Resp.Header().Add("WWW-Authenticate", `Basic`)
 		apiErrorDefined(ctx, errUnauthorized)
 	}
 }