Description of problem: oc registry login requires a kubeconfig. Various docs bugs have been filed for this: bz1857296 bz1861958 bz1866588 It seems that the oc registry login command requires a kubeconfig even if flags are provided that do not use a kubeconfig, specifically the --auth-basic flag. Version-Release number of selected component (if applicable): 4.5.7 How reproducible: Always Steps to Reproduce: $ oc registry login --to ./nowhere.json --registry nowhere:5000 --auth-basic=nothing:nothing error: Missing or incomplete configuration info. Please point to an existing, complete config file: 1. Via the command-line flag --kubeconfig 2. Via the KUBECONFIG environment variable 3. In your home directory as ~/.kube/config To view or setup config directly use the 'config' command.
The following lines seem to be the offender: release-4.5 branch https://github.com/openshift/oc/blob/5e7af8cc3c5694f7cc22ae3f2f1e54cccc485afe/pkg/cli/registry/login/login.go#L151-L154
I've submitted https://github.com/openshift/oc/pull/542 for review
Since oc registry login is targeted at users of the internal registry, which in majority cases means re-using cluster credentials we're not envisioning changing oc registry login with this ask. It is sufficient to update the documentation accordingly. *** This bug has been marked as a duplicate of bug 1866588 ***
*** This bug has been marked as a duplicate of bug 1866588 ***