JFrog invalid access token when pushing docker image

Viewed 41

I'm having an issue where I can't push docker images with JFrog CLI:

This works:

docker login -u <username> --password <ACCESS_TOKEN> <URL>
docker tag my_img:latest <url>/<repository>/my_image:latest
docker push <url>/<repository>/my_image:latest

However

jf config add --interactive=false --user <username> --url <URL> --access_token <ACCESS_TOKEN> myServer
docker tag my_img:latest <url>/<repository>/my_image:latest
jf use myServer
jf docker push <url>/<repository>/my_image:latest --server-id myServer

gives me an error:

[Error] received invalid access-token

I would expect that those two are equivalent.

I also tried a couple of variations - to the same effect:

jf docker push image_name/latest <repository>/image_name:latest --server-id myServer

jf rt dp my_image/latest <repository>/my_image:latest

To make thing even weirder, the same jf config works fine for conan:

jf config use myServer
jf rt upload <path>/<artifact> <conan_repository>/<artifact>

What am I missing?

1 Answers

I am suspecting that the CLI call is running into a similar issue as reported here.

Instead of using an identity token created from the user profile section, can you please try using an Access Token generated under the following path?

JFrog Platform UI -> Administration -> User management -> Access Token?

Related