private static RegistryImage getRegistryImage(String targetImage, Credential credential) throws InvalidImageReferenceException {
        RegistryImage registryImage = RegistryImage.named(targetImage);
        if (credential != null && !credential.getUsername().isEmpty() && !credential.getPassword().isEmpty()) {
            registryImage.addCredential(credential.getUsername(), credential.getPassword());
        }
        return registryImage;
    }
Push Image to registry using JIB

@param imageConfiguration ImageConfiguration
@param pushCredentials    push credentials
@param tarArchive         tar archive built during build goal
@param log                Logger
src/main/java/io/fabric8/maven/docker/util/JibServiceUtil.java