Class PushCommandBuilder

java.lang.Object
sonia.scm.repository.api.PushCommandBuilder

public final class PushCommandBuilder extends Object
The push command push changes to another repository.
Since:
1.31
  • Method Details

    • withUsernamePassword

      public PushCommandBuilder withUsernamePassword(String username, String password)
      Set username and password for request
      Parameters:
      username - username
      password - password
      Returns:
      this builder instance.
      Since:
      2.22.0
    • withForce

      public PushCommandBuilder withForce(boolean force)
    • push

      public PushResponse push(Repository remoteRepository) throws IOException
      Push all changes to the given remote repository.
      Parameters:
      remoteRepository - remote repository
      Returns:
      information of the executed push command
      Throws:
      IOException
      PushFailedException - when the push (maybe just partially) failed (since 2.47.0)
    • push

      public PushResponse push(String url) throws IOException
      Push all changes to the given remote url.
      Parameters:
      url - url of a remote repository
      Returns:
      information of the executed push command
      Throws:
      IOException
      PushFailedException - when the push (maybe just partially) failed (since 2.47.0)
      Since:
      1.43