Skip to content

Getting 400 error when trying to push to Artifactory #181

@radio-j

Description

@radio-j

When trying to push to a self-hosted Artifactory (version 7.104.15) instance, I receive a 400 error message. This is when I try to run the porter command, where I receive messages like:

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"

it behaves as expected if I do not include these images.

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.

I believe this to be an issue with cnab-to-oci because I get the exact same error when I run that command directly:
jb120940@ops-jb120940:~/Workspace/kubernetes_setup$ cnab-to-oci push .cnab/bundle.json --target <ARTIFACTORY_URL>/oci-local/porter-hello --auto-update-bundle --log-level fatal
...
Completed image <ARTIFACTORY_URL>/docker-k8s-remote/kube-apiserver@sha256:e8ae58675899e946fabe38425f2b3bfd33120b7930d05b5898de97c81a7f6137 copy
Error: unexpected status from PUT request to https://<ARTIFACTORY_URL>/v2/oci-local/porter-hello/manifests/sha256:cbdaf03c0df423899f20b70b6eebecccbee9c09861d56a56d09db93c84c611d8: 400 Bad Request

The output from the Artifactory side is here:

2025-07-26T20:37:53.914Z [jfrt ] [INFO ] [5dca7ec61a2c7fc6] [h.DockerManifestPutHandler:123] [http-nio-8081-exec-4] - Deploying manifest for image 'porter-hello' and tag 'sha256:4830f10d8921a529945d773a30f2193541c7f4fb872c1fb51b671a54d07499f5' in repo 'oci-local'
2025-07-26T20:37:53.926Z [jfrt ] [ERROR] [5dca7ec61a2c7fc6] [h.DockerManifestPutHandler:598] [http-nio-8081-exec-4] - Error uploading manifest: 'Cannot invoke "com.fasterxml.jackson.databind.JsonNode.asText()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null'
2025-07-26T20:37:53.948Z [jfrt ] [INFO ] [266e95cc4666633e] [h.DockerManifestPutHandler:123] [http-nio-8081-exec-6] - Deploying manifest for image 'porter-hello' and tag 'sha256:cbdaf03c0df423899f20b70b6eebecccbee9c09861d56a56d09db93c84c611d8' in repo 'oci-local'
2025-07-26T20:37:53.954Z [jfrt ] [ERROR] [266e95cc4666633e] [h.DockerManifestPutHandler:598] [http-nio-8081-exec-6] - Error uploading manifest: 'Cannot invoke "com.fasterxml.jackson.databind.JsonNode.asText()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null'

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