public GitProvider(ILogger <GitProvider> logger, GitProviderOptions providerOptions)
        {
            _logger          = logger;
            _providerOptions = providerOptions;

            if (string.IsNullOrWhiteSpace(_providerOptions.LocalPath))
            {
                throw new ArgumentNullException(nameof(_providerOptions.LocalPath), $"{nameof(_providerOptions.LocalPath)} cannot be NULL or empty.");
            }

            if (string.IsNullOrWhiteSpace(_providerOptions.RepositoryUrl))
            {
                throw new ArgumentNullException(nameof(_providerOptions.RepositoryUrl), $"{nameof(_providerOptions.RepositoryUrl)} cannot be NULL or empty.");
            }

            if (string.IsNullOrWhiteSpace(_providerOptions.Username))
            {
                throw new ArgumentNullException(nameof(_providerOptions.Username), $"{nameof(_providerOptions.Username)} cannot be NULL or empty.");
            }

            if (string.IsNullOrWhiteSpace(_providerOptions.Password))
            {
                throw new ArgumentNullException(nameof(_providerOptions.Password), $"{nameof(_providerOptions.Password)} cannot be NULL or empty.");
            }

            _credentialsHandler = (url, user, cred) => new UsernamePasswordCredentials
            {
                Username = _providerOptions.Username,
                Password = _providerOptions.Password
            };
        }
        public GitProvider(ILogger <GitProvider> logger, GitProviderOptions providerOptions)
        {
            _logger          = logger;
            _providerOptions = providerOptions;

            if (string.IsNullOrWhiteSpace(_providerOptions.LocalPath))
            {
                throw new ArgumentNullException(nameof(_providerOptions.LocalPath), $"{nameof(_providerOptions.LocalPath)} cannot be NULL or empty.");
            }

            if (string.IsNullOrWhiteSpace(_providerOptions.RepositoryUrl))
            {
                throw new ArgumentNullException(nameof(_providerOptions.RepositoryUrl), $"{nameof(_providerOptions.RepositoryUrl)} cannot be NULL or empty.");
            }
        }