public CredentialRetriever known(Credential credential, String credentialSource) {
    return () -> {
      logGotCredentialsFrom("credentials from " + credentialSource);
      return Optional.of(credential);
    };
  }
Creates a new {@link CredentialRetriever} that returns a known {@link Credential}.

@param credential the known credential
@param credentialSource the source of the credentials (for logging)
@return a new {@link CredentialRetriever}
jib-core/src/main/java/com/google/cloud/tools/jib/frontend/CredentialRetrieverFactory.java