Don’t know if you’re still waiting (found your thread while searching for another issue =S)
I ran across this: https://docs.docker.com/engine/api/get-started/#pull-images-with-authentication
snippet:
authConfig := types.AuthConfig{
Username: "username",
Password: "password",
}
encodedJSON, err := json.Marshal(authConfig)
if err != nil {
panic(err)
}
authStr := base64.URLEncoding.EncodeToString(encodedJSON)
If you get this far, you may run into my issue:
- The error goes away
- No push occurs
- No data from the returned
io.ReadClose
I’ve even put in dummy credentials, invalid ServerAddress, dummy base64 string (heck, I’ve even tried random characters that aren’t even valid base64 strings.)
It seems that as long as you pass in options, it just blindly fails somewhere with no error ever being returned.