def get_repo_url(pack, proxy_config=None):
    """
    Retrieve pack repo url.

    :rtype: ``str``

    :return: (repo_url, version)
    :rtype: tuple
    """
    pack_and_version = pack.split(PACK_VERSION_SEPARATOR)
    name_or_url = pack_and_version[0]
    version = pack_and_version[1] if len(pack_and_version) > 1 else None

    if len(name_or_url.split("/")) == 1:
        pack = get_pack_from_index(name_or_url, proxy_config=proxy_config)

        if not pack:
            raise Exception('No record of the "%s" pack in the index.' % (name_or_url))

        return (pack["repo_url"], version or pack["version"])
    else:
        return (eval_repo_url(name_or_url), version)

    Retrieve pack repo url.

    :rtype: ``str``

    :return: (repo_url, version)
    :rtype: tuple
    
st2common/st2common/util/pack_management.py