Skip to content

Commit c0e0c53

Browse files
authored
Merge pull request #388 from jglick/NPE-JENKINS-71078
[JENKINS-71078] Better report lack of AWS credentials
2 parents 44bbfcf + 6c4487b commit c0e0c53

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStore.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ private Supplier<Credentials> getCredentialsSupplier() throws IOException {
157157

158158
if (getConfiguration().getDisableSessionToken()) {
159159
AmazonWebServicesCredentials awsCredentials = CredentialsAwsGlobalConfiguration.get().getCredentials();
160+
if (awsCredentials == null) {
161+
throw new IOException("No static AWS credentials found");
162+
}
160163
accessKeyId = awsCredentials.getCredentials().getAWSAccessKeyId();
161164
secretKey = awsCredentials.getCredentials().getAWSSecretKey();
162165
sessionToken = "";

0 commit comments

Comments
 (0)