Parse out the repository identifier from a github URL.

def _remote_github_url_to_string(remote_url):
    """Parse out the repository identifier from a github URL."""
    # TODO: make this work with https URLs
    match = re.search('git@github\.com:(.*)\.git', remote_url)
    if not match:
        raise EnvironmentError('Remote is not a valid github URL')
    identifier = match.group(1)
    return re.sub('\W', ':', identifier)