fix comments and handle err
Signed-off-by: allencloud <allen.sun@daocloud.io> Upstream-commit: cc054f3195308da471c252d755dacfe446cb1066 Component: engine
This commit is contained in:
@ -42,6 +42,9 @@ func runPush(dockerCli *client.DockerCli, name string) error {
|
||||
ctx := context.Background()
|
||||
|
||||
repoInfo, err := registry.ParseRepositoryInfo(named)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
authConfig := dockerCli.ResolveAuthConfig(ctx, repoInfo.Index)
|
||||
|
||||
encodedAuth, err := client.EncodeAuthToBase64(authConfig)
|
||||
|
||||
Reference in New Issue
Block a user