2016-12-16 107 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