Skip to content

Commit

Permalink
Merge pull request #388 from jglick/NPE-JENKINS-71078
Browse files Browse the repository at this point in the history
[JENKINS-71078] Better report lack of AWS credentials
  • Loading branch information
jglick authored Apr 19, 2023
2 parents 44bbfcf + 6c4487b commit c0e0c53
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 c0e0c53

Please sign in to comment.