/*
  * JGit doesn't have ls-remote command independent from repository yet.
  * That way, we have a hack here: if http response asked for a password, then the url is at least valid and existant, and we consider
  * that the test passed.
  */
 private boolean test(String url) {
   final GitLineHandlerPasswordRequestAware handler =
       new GitLineHandlerPasswordRequestAware(myProject, new File("."), GitCommand.LS_REMOTE);
   handler.setRemoteProtocol(url);
   handler.addParameters(url, "master");
   GitTask task = new GitTask(myProject, handler, GitBundle.message("clone.testing", url));
   GitTaskResult result = task.executeModal();
   boolean authFailed = handler.hadAuthRequest();
   return result.isOK() || authFailed;
 }