fix comments and handle err

Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: cc054f3195308da471c252d755dacfe446cb1066
Component: engine
This commit is contained in:
allencloud
2016-06-29 17:26:42 +08:00
parent c89614146c
commit 24d57a19bb
5 changed files with 13 additions and 6 deletions

View File

@ -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)