def get_author_email(repo, use_git_config):
    """Get author and email from git configuration"""
    author = email = None
    if use_git_config:
        try:
            author = repo.get_config('user.name')
        except KeyError:
            pass
        try:
            email = repo.get_config('user.email')
        except KeyError:
            pass
    return author, email
