@Override
 public void remoteUpdate(RemoteUpdateRequest request) throws GitException {
   nativeGit
       .createRemoteUpdateCommand()
       .setRemoteName(request.getName())
       .setAddUrl(request.getAddUrl())
       .setBranchesToAdd(request.getBranches())
       .setAddBranches(request.isAddBranches())
       .setAddPushUrl(request.getAddPushUrl())
       .setRemovePushUrl(request.getRemovePushUrl())
       .setRemoveUrl(request.getRemoveUrl())
       .execute();
 }
 @Override
 public void remoteUpdate(RemoteUpdateRequest request) throws GitException {
   ensureExistenceRepoRootInWorkingDirectory();
   nativeGit
       .createRemoteUpdateCommand()
       .setRemoteName(request.getName())
       .setAddUrl(request.getAddUrl())
       .setBranchesToAdd(request.getBranches())
       .setAddBranches(request.isAddBranches())
       .setAddPushUrl(request.getAddPushUrl())
       .setRemovePushUrl(request.getRemovePushUrl())
       .setRemoveUrl(request.getRemoveUrl())
       .execute();
 }
  @Override
  public void clone(CloneRequest request)
      throws URISyntaxException, UnauthorizedException, GitException {
    final String remoteUri = request.getRemoteUri();
    CloneCommand clone = nativeGit.createCloneCommand();
    clone.setRemoteUri(remoteUri);
    clone.setRemoteName(request.getRemoteName());
    if (clone.getTimeout() > 0) {
      clone.setTimeout(request.getTimeout());
    }

    executeRemoteCommand(clone);

    UserCredential credentials = credentialsLoader.getUserCredential(remoteUri);
    if (credentials != null) {
      getConfig().set("codenvy.credentialsProvider", credentials.getProviderId());
    }
    nativeGit
        .createRemoteUpdateCommand()
        .setRemoteName(request.getRemoteName() == null ? "origin" : request.getRemoteName())
        .setNewUrl(remoteUri)
        .execute();
  }