def parse_git_url(git_url):
    """Parse the git url.

    Args:
        git_url (str): url of a git repository (https or ssh)

    Returns:
        (str, str, str): tupple of domain, user and project name parsed from url
    """
    import re
    regex = re.compile(
        '(?:git@|https:\\/\\/)([\\w\\-_\\.]+)[:\\/]([\\w\\-_\\.\\/]+)[\\/]([\\w\\-_]+)(?:.git)*$'
        )
    domain, user, project = regex.search(git_url).groups()
    return domain, user, project
