I was asked to use Docker Hub as part of a build/deploy pipeline. I am supposed to provide some authentication credentials to a third-party tool, so that this tool can push container images to private repos.

Now, I don't see any place where I can generate secrets/API key that are safe to give to that third-party. Am I missing something? In Amazon for example I can create roles with IAM.

Note: The platform I tried to use is banzaicloud.com . Trying to setup a basic Nodejs app following their instructions. As far as I'm concerned, the problem of authentication should not be on the third-party tools side. The same way I can generate API keys for any kind of service and use them in whatever client I want. In the platform I refer to, it seems only the "full docker hub account" credentials can be used instead of some kind of dedicated third party mechanism (like API keys or IAM, etc).


2 Answers 2


You can generate an access token for docker hub by going here:


And creating a new access token.

It's essentially the same process for organisational access tokens or for personal access tokens IIRC.

Once you have generated the access token you can literally just use that token instead of the password for most docker hub operations (ie. docker login --username $user --password $token)


If you are using Jenkins the answer is in this document:


enter image description here

enter image description here

  • 1
    Hello, as far as I understand I need credentials from DockerHub, not the other way around.
    – Kev
    Commented Jan 18, 2019 at 0:46
  • @amida Make sure to mask them in your build pipeline as well so that they do not show up in the logs or in the console dump... Commented Jan 20, 2019 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.