public RegistryImage addCredential(String username, String password) {
    addCredentialRetriever(() -> Optional.of(Credential.from(username, password)));
    return this;
  }
Adds a username-password credential to use to push/pull the image. This is a shorthand for
{@code addCredentialRetriever(() -> Optional.of(Credential.basic(username, password)))}.

@param username the username
@param password the password
@return this
jib-core/src/main/java/com/google/cloud/tools/jib/api/RegistryImage.java