class GitUtils {

	public static boolean isValidRemoteRepository(String remoteGitUrl) {
		if(StringUtils.isBlank(remoteGitUrl)) {
			return false;
		}
		
		URIish uriish = null;
		try {
			uriish = new URIish(remoteGitUrl);
		} catch (URISyntaxException e) {
			return false;
		}
		
		if(!uriish.isRemote()) {
			return false;
		}

		try {
			return !Git.lsRemoteRepository().setHeads(false).setTags(false).setRemote(remoteGitUrl).call().isEmpty();
		} catch (GitAPIException e) {
			return false;
		}
	}

}