diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java b/jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java index a2d97e35bb..53e22e0176 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java +++ b/jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java @@ -237,7 +237,7 @@ static Multimap decodeTokenRepositoryGrants(String token) { // mutable private final AtomicReference authorization = new AtomicReference<>(); - private boolean readOnlyBearerAuth; + private volatile boolean readOnlyBearerAuth; private final AtomicReference initialBearerAuthenticator = new AtomicReference<>();