docs: protected String stripCredentialsFromOriginUrl(String gitRemoteString) throws GitCommitIdExecutionException {
  
      // The URL might be null if the repo hasn't set a remote
      if (gitRemoteString == null) {
        return gitRemoteString;
      }
  
      // Remotes using ssh connection strings in the 'git@github' format aren't
      // proper URIs and won't parse . Plus since you should be using SSH keys,
      // credentials like are not in the URL.
      if (GIT_SCP_FORMAT.matcher(gitRemoteString).matches()) {
        return gitRemoteString;
      }
      // At this point, we should have a properly formatted URL
      try {
        URI original = new URI(gitRemoteString);
        String userInfoString = original.getUserInfo();
        if (null == userInfoString) {
          return gitRemoteString;
        }
        URIBuilder b = new URIBuilder(gitRemoteString);
        String[] userInfo = userInfoString.split(":");
        // Build a new URL from the original URL, but nulling out the password
        // component of the userinfo. We keep the username so that ssh uris such
        // ssh://git@github.com will retain 'git@'.
        b.setUserInfo(userInfo[0]);
        return b.build().toString();
  
      } catch (URISyntaxException e) {
        log.error("Something went wrong to strip the credentials from git's remote url (please report this)!", e);
        return "";
      }
    }