2

The relevant (I think) part of my wercker.yml is:

deploy:
  steps:
    - internal/docker-push:
      username: $USERNAME
      password: $PASSWORD
      entrypoint: /pipeline/source/pipeline
      tag: latest
      repository: colezlaw/pipeline
      registry: https://registry.hub.docker.com

I have a repository on hub called colezlaw/pipeline, and I've got my dockerhub credentials set in the pipeline on wercker. However, once it tries to push to docker, it's getting a 401:

Error interacting with this repository: colezlaw/pipeline PUT https://registry.hub.docker.com/v1/repositories/colezlaw/pipeline/ returned 401

Is there something else I need to set up on the dockerhub side?

Colselaw
  • 1,069
  • 9
  • 21
  • Starting with the simple stuff, are you sure that those credentials work, and that they are reaching the Wercker step? i.e can you echo them to test inside the step? Also note that you shouldn't need to define the registry parameter, since the step uses Docker hub by default. – Aaron Dec 19 '16 at 13:26
  • @Aaron Yes - those are the correct credentials, and they are being read - if I echo them in a step prior (env/env), they get echoed there. – Colselaw Dec 20 '16 at 00:04
  • @Coleslaw Hrm, and you can push to Dockerhub with them outside of Wercker? – Aaron Dec 20 '16 at 10:40
  • @Aaron - yes - they work fine. Did a docker logout and login with the same creds. – Colselaw Dec 20 '16 at 12:56

1 Answers1

0

Instead of setting the credentials in the pipeline add the environment variables $USERNAME, and $PASSWORD in Environment tab similar to the image below. enter image description here

sanjeev kaneria
  • 57
  • 1
  • 11