2

我的相关(我认为)部分wercker.yml是:

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

我在集线器上有一个名为 colezlaw/pipeline 的存储库,并且我在 wercker 的管道中设置了我的 dockerhub 凭据。但是,一旦它尝试推送到 docker,就会得到 401:

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

我还需要在 dockerhub 端设置什么吗?

4

1 回答 1

0

不要在管道中设置凭据,而是在类似于下图的环境选项卡中添加环境变量 $USERNAME 和 $PASSWORD。 在此处输入图像描述

于 2017-09-11T21:37:36.010 回答