Skip to content

helm push using zot is 403 #12234

Closed

Description

@cuisongliu

Output of helm version:
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}
Output of kubectl version:

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

  1. login
helm registry login 192.168.64.1:6000 --username admin --insecure --password admin --debug
WARNING: Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
  1. push
helm  push openebs-3.4.1.tgz   oci://192.168.64.1:6000/charts --insecure-skip-tls-verify
Error: unexpected status from POST request to https://192.168.64.1:6000/v2/charts/openebs/blobs/uploads/: 403 Forbidden

so I modify code

if client.resolver == nil {
		headers := http.Header{}
		headers.Set("User-Agent", version.GetUserAgent())
		headers.Set("Authorization", "Basic YWRtaW46YWRtaW4=")
		opts := []auth.ResolverOption{auth.WithResolverHeaders(headers)}

		if client.httpClient != nil {
			opts = append(opts, auth.WithResolverClient(client.httpClient))
		}
		resolver, err := client.authorizer.ResolverWithOpts(opts...)
		if err != nil {
			return nil, err
		}
		client.resolver = resolver
	}

Upload was successful. I think it's an oci upload error. We need to upgrade the code to support it. If you agree with me, you can assign this issue to me.

Activity

  1. gjenkins8 commented on Jul 18, 2023

    @gjenkins8
    Member

    @sabre1041 for OCI issues

  2. yxxhero commented on Jul 22, 2023

    @yxxhero
    Member

    @cuisongliu PR is welcome.

  3. cuisongliu commented on Jul 22, 2023

    @cuisongliu
    ContributorAuthor

    @cuisongliu PR is welcome.

    I have submitted a PR #12237, please help me review, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions