1
我正在嘗試登錄到您使用oadm工具構建的Docker註冊表。我試圖登錄使用令牌:TLS自簽名證書用於Docker的身份驗證URL
# docker login -u $(oc whoami) -e 'xxxx' -p $(oc whoami -t) 172.30.10.52:5000
Error response from daemon: no successful auth challenge for
https://172.30.10.52:5000/v2/ - errors: [basic auth attempt to
https://172.30.10.52:5000/v2/ realm "openshift" failed with status: 400 Bad
Request]
尋找在日誌中,我可以看到這個問題是因爲我的情況下使用自簽名證書:
time="2017-01-10T00:58:42.913539516Z" level=error msg="error authorizing context:
Get https://ld7-zko8s6q-ws:8443/oapi/v1/users/~: x509:
certificate signed by unknown authority"
go.version=go1.4.2 http.request.host="172.30.10.52:5000"
http.request.id=3fa81975-3aa9-44d8-a6a8-c00ad360009c
http.request.method=GET http.request.remoteaddr="10.1.0.1:49316"
http.request.uri="/v2/" http.request.useragent="docker/1.10.3 go/go1.6.2
git-commit/429be27-unsupported kernel/3.10.0-514.2.2.el7.x86_64
os/linux arch/amd64" instance.id=2a23b229-2a0e-4734-83c4-38cb9c8a0e00
我無論怎樣才能得到我的證書是可信的還是關閉TLS驗證?