clearml_agent/helper/repo.py
def replace_ssh_url(cls, url):
        # type: (Text) -> Text
        """
        Replace SSH URL with HTTPS URL when applicable
        """

        def get_username(user_, password=None):
            """
            Remove special SSH users hg/git
            """
            return (
                None
                if user_ and user_.lower() in ["hg", "git"] and not password
                else user_
            )

        match = cls.SSH_URL_GIT_SYNTAX.match(url)
        if match:
            user, host, path = match.groups()
            return (
                furl()
                .set(scheme="https", username=get_username(user), host=host, path=path)
                .url
            )
        parsed_url = furl(url)
        if parsed_url.scheme == "ssh":
            return parsed_url.set(
                scheme="https",
                username=get_username(
                    parsed_url.username, password=parsed_url.password
                ),
            ).url
        return url

        Replace SSH URL with HTTPS URL when applicable
        
Replace SSH URL with HTTPS URL when applicable
Replace SSH URL with HTTPS URL when applicable
def replace_ssh_url(cls, url):
        def get_username(user_, password=None):
            return (
                None
                if user_ and user_.lower() in ["hg", "git"] and not password
                else user_
            )
        match = cls.SSH_URL_GIT_SYNTAX.match(url)
        if match:
            user, host, path = match.groups()
            return (
                furl()
                .set(scheme="https", username=get_username(user), host=host, path=path)
                .url
            )
        parsed_url = furl(url)
        if parsed_url.scheme == "ssh":
            return parsed_url.set(
                scheme="https",
                username=get_username(
                    parsed_url.username, password=parsed_url.password
                ),
            ).url
        return url
def replace_ssh_url ( cls , url ) : def get_username ( user_ , password = None ) : """
            Remove special SSH users hg/git
            """ return ( None if user_ and user_ . lower ( ) in [ "hg" , "git" ] and not password else user_ ) match = cls . SSH_URL_GIT_SYNTAX . match ( url ) if match : user , host , path = match . groups ( ) return ( furl ( ) . set ( scheme = "https" , username = get_username ( user ) , host = host , path = path ) . url ) parsed_url = furl ( url ) if parsed_url . scheme == "ssh" : return parsed_url . set ( scheme = "https" , username = get_username ( parsed_url . username , password = parsed_url . password ) , ) . url return url
Replace SSH URL with HTTPS URL when applicable
Replace SSH URL with HTTPS URL when applicable
# type: (Text) -> Text """
        Replace SSH URL with HTTPS URL when applicable
        """ """
            Remove special SSH users hg/git
            """
cls
url