code: @SuppressWarnings("rawtypes")
          protected void setupCredentials(GitCommand<?> command) {
                  GitSettings settings = lookupSettings();
  
                  if (settings != null && command instanceof TransportCommand) {
                          TransportCommand cmd = (TransportCommand) command;
                          cmd.setCredentialsProvider(settings.getCredentials());
                  }
          }
docs: Setups the Git credentials if specified and needed
  
  @param command The git command to configure