public static GitRepositoryBuilder newInstance(final BaseGitProperties props) {
        val resolver = SpringExpressionLanguageValueResolver.getInstance();
        val builder = GitRepositoryBuilder.builder()
            .repositoryUri(resolver.resolve(props.getRepositoryUrl()))
            .activeBranch(resolver.resolve(props.getActiveBranch()))
            .branchesToClone(props.getBranchesToClone())
            .repositoryDirectory(props.getCloneDirectory().getLocation())
            .privateKeyPassphrase(props.getPrivateKeyPassphrase())
            .sshSessionPassword(props.getSshSessionPassword())
            .timeoutInSeconds(Beans.newDuration(props.getTimeout()).toSeconds())
            .signCommits(props.isSignCommits())
            .rebase(props.isRebase())
            .clearExistingIdentities(props.isClearExistingIdentities())
            .strictHostKeyChecking(props.isStrictHostKeyChecking())
            .httpClientType(props.getHttpClientType());
        if (StringUtils.hasText(props.getUsername())) {
            val providers = CollectionUtils.wrapList(
                new UsernamePasswordCredentialsProvider(props.getUsername(), props.getPassword()),
                new NetRCCredentialsProvider());
            builder.credentialsProviders(providers);
        }
        if (props.getPrivateKey().getLocation() != null) {
            val resource = ResourceUtils.prepareClasspathResourceIfNeeded(props.getPrivateKey().getLocation());
            if (resource != null && resource.exists()) {
                FunctionUtils.doUnchecked(__ -> builder.privateKeyPath(resource.getFile().getCanonicalPath()));
            }
        }
        return builder.build();
    }
New instance of git repository builder.

@param props the registry
@return the git repository builder
support/cas-server-support-git-core/src/main/java/org/apereo/cas/git/GitRepositoryBuilder.java