Skip to content

Commit

Permalink
[JENKINS-71078] Better report lack of AWS credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Apr 17, 2023
1 parent 44bbfcf commit 6c4487b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ private Supplier<Credentials> getCredentialsSupplier() throws IOException {

if (getConfiguration().getDisableSessionToken()) {
AmazonWebServicesCredentials awsCredentials = CredentialsAwsGlobalConfiguration.get().getCredentials();
if (awsCredentials == null) {
throw new IOException("No static AWS credentials found");
}
accessKeyId = awsCredentials.getCredentials().getAWSAccessKeyId();
secretKey = awsCredentials.getCredentials().getAWSSecretKey();
sessionToken = "";
Expand Down

0 comments on commit 6c4487b

Please sign in to comment.