diff --git a/pom.xml b/pom.xml
index 790b443287..e832dd77dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -266,6 +266,11 @@
mockwebserver
4.9.3
+
+ org.jenkins-ci.plugins
+ credentials
+ 1307.v3757c78f17c3
+
diff --git a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesFactoryAdapter.java b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesFactoryAdapter.java
index f36c498097..018a8cbb99 100644
--- a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesFactoryAdapter.java
+++ b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesFactoryAdapter.java
@@ -212,10 +212,10 @@ private static StandardCredentials resolveCredentials(@CheckForNull String crede
return null;
}
StandardCredentials c = CredentialsMatchers.firstOrNull(
- CredentialsProvider.lookupCredentials(
+ CredentialsProvider.lookupCredentialsInItemGroup(
StandardCredentials.class,
Jenkins.get(),
- ACL.SYSTEM,
+ ACL.SYSTEM2,
Collections.emptyList()
),
CredentialsMatchers.allOf(