class GitConfigProvisioner implements ConfigurationProvisioner<KubernetesEnvironment> {

  @Override
  public void provision(KubernetesEnvironment k8sEnv, RuntimeIdentity identity)
      throws InfrastructureException {

    try {
      Pair<String, String> userAndEmail = getUserFromPreferences();

      if (userAndEmail == null) {
        userAndEmail = getUserFromUserManager();
      }

      prepareAndProvisionGitConfiguration(
          userAndEmail.first, userAndEmail.second, k8sEnv, identity);
    } catch (ServerException | NotFoundException e) {
      reportWarning(
          k8sEnv,
          Warnings.EXCEPTION_IN_USER_MANAGEMENT_DURING_GIT_PROVISION_WARNING_CODE,
          format(
              Warnings.EXCEPTION_IN_USER_MANAGEMENT_DURING_GIT_PROVISION_MESSAGE_FMT,
              e.getMessage()));
    } catch (JsonSyntaxException e) {
      reportWarning(
          k8sEnv,
          Warnings.JSON_IS_NOT_A_VALID_REPRESENTATION_FOR_AN_OBJECT_OF_TYPE_WARNING_CODE,
          format(
              Warnings.JSON_IS_NOT_A_VALID_REPRESENTATION_FOR_AN_OBJECT_OF_TYPE_MESSAGE_FMT,
              e.getMessage()));
    }
  }

  @Inject public  GitConfigProvisioner(
      PreferenceManager preferenceManager,
      UserManager userManager,
      VcsSslCertificateProvisioner vcsSslCertificateProvisioner);

}