Skip to content

Getting 400 error when trying to push to Artifactory #3398

@radio-j

Description

@radio-j

Describe the bug

When I run the publish command to my self-hosted artifactory instance, I get this error:
unable to copy bundle to new location: error pushing the bundle to <ARTIFACTORY_URL>/porter-hello:v0.0.1: unexpected status from PUT request to <ARTIFACTORY_URL>/porter-hello/manifests/v0.0.1: 400 Bad Request
unable to copy bundle to new location: error pushing the bundle to <ARTIFACTORY_URL>/porter-hello:v0.0.1: unexpected status from PUT request to <ARTIFACTORY_URL>/porter-hello/manifests/v0.0.1: 400 Bad Request

This only occurs if I'm including images via "image:", like so:
images:
kube-apiserver:
description: "Kubeapi server for k8s setup"
imageType: "docker"
repository: "<ARTIFACTORY_URL>/kube-apiserver"
digest: "sha256:e8ae58675899e946fabe38425f2b3bfd33120b7930d05b5898de97c81a7f6137"

in any other instance it behaves as expected.

I also tested this with a repository container running on localhost and it also works as expected. However when I tried to copy from this local repository to Artifactory, it fails as well.

To Reproduce

Steps to reproduce the behavior:

  1. run porter create (the default porter.yaml ought to do)
  2. Add an image under the "image" parameter, it shouldn't matter which
  3. Add an artifactory repository as the registry
  4. exit from porter.yaml, run porter publish

Expected behavior

Porter should push the bundle (with associated images) to the repo with no 400 errors

Porter Command and Output

$ porter [e.g. install --param foo=bar --credential-set azure]
jb120940@ops-jb120940:~/Workspace/kubernetes_setup$ porter copy --source localhost:5000/porter-hello:v0.0.1 --destination <ARTIFACTORY_URL>/porter-hello:v0.0.1
reference not found (<ARTIFACTORY_URL>/porter-hello:v0.0.1)
Beginning bundle copy to <ARTIFACTORY_URL>/porter-hello:v0.0.1. This may take some time.
Starting to copy image localhost:5000/porter-hello@sha256:13bee12711c8b0f7b0f526ec58af21b2b0159a5098cf3d12e73a2e60378ac707...
Completed image localhost:5000/porter-hello@sha256:13bee12711c8b0f7b0f526ec58af21b2b0159a5098cf3d12e73a2e60378ac707 copy
Starting to copy image localhost:5000/porter-hello@sha256:2236e72a4be5dcc9c04600353ff8849db1557f5364947c520ff05471ae719081...
Completed image localhost:5000/porter-hello@sha256:2236e72a4be5dcc9c04600353ff8849db1557f5364947c520ff05471ae719081 copy
error pushing the bundle to <ARTIFACTORY_URL>/porter-hello:v0.0.1: unexpected status from PUT request to <ARTIFACTORY_URL>/v2/oci-local/porter-hello/manifests/v0.0.1: 400 Bad Request
unable to copy bundle to new location: error pushing the bundle to <ARTIFACTORY_URL>/porter-hello:v0.0.1: unexpected status from PUT request to <ARTIFACTORY_URL>/v2/oci-local/porter-hello/manifests/v0.0.1: 400 Bad Request
unable to copy bundle to new location: error pushing the bundle to<ARTIFACTORY_URL>/porter-hello:v0.0.1: unexpected status from PUT request to <ARTIFACTORY_URL>/v2/oci-local/porter-hello/manifests/v0.0.1: 400 Bad Request

Version

porter v1.2.1 (aa97c59)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOops, sorry!

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions