2016-12-16 111 views
2

wercker.yml相关的(我认为)的部分是:401 Wercker内部/泊坞窗推到dockerhub

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 /管道的仓库,我有我的dockerhub凭证在管道上设置的凭证。但是,一旦它试图推到搬运工,它才获得了401:

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

有没有别的东西,我需要建立在dockerhub的一面呢?

+0

从简单的东西开始,你确定这些证书有效,并且他们正在到达Wercker步骤?即你能回应他们在步骤内测试吗?另外请注意,您不需要定义注册表参数,因为该步骤默认情况下使用Docker集线器。 – Aaron

+0

@Aaron是的 - 那些是正确的凭据,他们正在阅读 - 如果我在之前的步骤(env/env)中回应他们,他们会在那里得到回应。 – Colselaw

+0

@Coleslaw Hrm,你可以在Wercker之外将他们推到Dockerhub上吗? – Aaron

回答

0

而不是在管道中设置凭据,在环境选项卡中添加环境变量$ USERNAME和$ PASSWORD类似于下图。 enter image description here