Skip to content

Commit 5304de7

Browse files
committed
update .dockercfg content to config.json
update the data format of .dockercfg to match the new docker config.json format, which encapsulates all registry auth objects in an overall "auths" object: { "auths": { "reg.url": { "auth": "...==" } } }
1 parent 8363697 commit 5304de7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/oc/cli/secrets/dockercfg.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ func (o CreateDockerConfigOptions) NewDockerSecret() (*api.Secret, error) {
125125
Email: o.EmailAddress,
126126
}
127127

128-
dockerCfg := map[string]credentialprovider.DockerConfigEntry{o.RegistryLocation: dockercfgAuth}
128+
dockerCfg := credentialprovider.DockerConfigJson{
129+
Auths: map[string]credentialprovider.DockerConfigEntry{o.RegistryLocation: dockercfgAuth},
130+
}
129131

130132
dockercfgContent, err := json.Marshal(dockerCfg)
131133
if err != nil {

0 commit comments

Comments
 (0)