docs: private List<Pair<String, StandardCredentials>> getGitClientCredentials() {
          List<Pair<String, StandardCredentials>> credentialsList = new ArrayList<>();
          GitSCM gitScm = getJenkinsScm();
          for (UserRemoteConfig uc : gitScm.getUserRemoteConfigs()) {
              String url = uc.getUrl();
              // In case overriding credentials are defined, we will use it for this URL
              if (this.credentials != null) {
                  credentialsList.add(Pair.of(url, this.credentials));
                  continue;
              }
  
              // Get credentials from jenkins credentials plugin
              if (uc.getCredentialsId() != null) {
                  StandardUsernameCredentials credentials = CredentialsMatchers.firstOrNull(
                                  CredentialsProvider.lookupCredentials(StandardUsernameCredentials.class,
                                          build.getProject(), ACL.SYSTEM, URIRequirementBuilder.fromUri(url).build()),
                                  CredentialsMatchers.allOf(CredentialsMatchers.withId(uc.getCredentialsId()),
                                          GitClient.CREDENTIALS_MATCHER));
                  if (credentials != null) {
                      credentialsList.add(Pair.of(url, (StandardCredentials)credentials));
                  }
              }
          }
          return credentialsList;
      }