Bug 1696366
| Summary: | oc registry tools read $PWD/config.json if existing and assume it's a docker config => auth errors | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Stefan Schimanski <sttts> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED ERRATA | QA Contact: | zhou ying <yinzhou> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | low | ||
| Version: | 4.1.0 | CC: | aos-bugs, jokerman, mfojtik, mmccomas, rvokal, xxia |
| Target Milestone: | --- | ||
| Target Release: | 4.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-04 10:47:03 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is not a 4.1 blocker, moving target to 4.2. Confirmed with latest oc client, the issue can't be reproduced:
[root@dhcp-140-138 ~]# oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0", GitCommit:"74c534b60", GitTreeState:"", BuildDate:"2019-04-21T21:13:18Z", GoVersion:"", Compiler:"", Platform:""}
[root@dhcp-140-138 ~]# echo '{}' > config.json
[root@dhcp-140-138 ~]# ll -t
total 43600
-rw-r--r--. 1 root root 3 Apr 22 13:41 config.json
[root@dhcp-140-138 ~]# more config.json
{}
[root@dhcp-140-138 ~]# oc adm release info --commits registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-04-22-005054
Name: 4.1.0-0.nightly-2019-04-22-005054
Digest: sha256:3f3628cd9b694705cb0627ce72e61932df5d9938a291fabba1ed691230f7b548
Created: 2019-04-22T00:54:08Z
OS/Arch: linux/amd64
Manifests: 273
Pull From: registry.svc.ci.openshift.org/ocp/release@sha256:3f3628cd9b694705cb0627ce72e61932df5d9938a291fabba1ed691230f7b548
Release Metadata:
Version: 4.1.0-0.nightly-2019-04-22-005054
Upgrades: <none>
Component Versions:
Kubernetes 1.13.4
.....
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758 |
Description of problem: A config.json in the current directory is considered as docker config.json with credentials. If it exists ~/.docker/config.json is not read. Command like `oc adm release` fail with auth error to upload images because no auth tokens are loaded. Version-Release number of selected component (if applicable): 3 year old code in k/k/pkg/credentialprovider/config.go:84 used by oc. So probably it is in old version. Found in current origin master. How reproducible: echo '{}' > config.json; oc adm release ... => auth error Actual results: auth error when uploading to Docker hub Expected results: successful image push. Additional info: