def METHOD_NAME(self):
    """
    Test valid course with and without user specified.
    Test skipped if git global config override environment variable GIT_CONFIG
    is set.
    """
    git_export_utils.export_to_git(
        self.course.id,
        f'file://{self.bare_repo_dir}',
        'enigma'
    )
    expect_string = '{}|{}\n'.format(
        git_export_utils.GIT_EXPORT_DEFAULT_IDENT['name'],
        git_export_utils.GIT_EXPORT_DEFAULT_IDENT['email']
    )
    cwd = os.path.abspath(git_export_utils.GIT_REPO_EXPORT_DIR / 'test_bare')
    git_log = subprocess.check_output(['git', 'log', '-1',
                                       '--format=%an|%ae'], cwd=cwd).decode('utf-8')
    self.assertEqual(expect_string, git_log)
    # Make changes to course so there is something to commit
    self.populate_course()
    git_export_utils.export_to_git(
        self.course.id,
        f'file://{self.bare_repo_dir}',
        self.user.username
    )
    expect_string = '{}|{}\n'.format(
        self.user.username,
        self.user.email,
    )
    git_log = subprocess.check_output(
        ['git', 'log', '-1', '--format=%an|%ae'], cwd=cwd).decode('utf-8')
    self.assertEqual(expect_string, git_log)