diff --git a/src/main/java/org/gaul/s3proxy/Main.java b/src/main/java/org/gaul/s3proxy/Main.java index 59eb357f..74f268db 100644 --- a/src/main/java/org/gaul/s3proxy/Main.java +++ b/src/main/java/org/gaul/s3proxy/Main.java @@ -325,6 +325,9 @@ private static BlobStore createBlobStore(Properties properties, StandardCharsets.UTF_8).read(); } properties.remove(Constants.PROPERTY_CREDENTIAL); + // We also need to clear the system property, otherwise the + // credential will be overridden by the system property. + System.clearProperty(Constants.PROPERTY_CREDENTIAL); } if (identity == null || credential == null) {