Skip to content

Commit

Permalink
Fix clearml-task ssh repo links are not detected as remote repositori…
Browse files Browse the repository at this point in the history
…es (issue #423)
  • Loading branch information
allegroai committed Aug 15, 2021
1 parent aacc982 commit b275520
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion clearml/backend_interface/task/populate.py
Expand Up @@ -15,6 +15,17 @@


class CreateAndPopulate(object):
_VCS_SSH_REGEX = \
"^" \
"(?:(?P<user>{regular}*?)@)?" \
"(?P<host>{regular}*?)" \
":" \
"(?P<path>{regular}.*)?" \
"$" \
.format(
regular=r"[^/@:#]"
)

def __init__(
self,
project_name=None, # type: Optional[str]
Expand Down Expand Up @@ -74,7 +85,7 @@ def __init__(
:param raise_on_missing_entries: If True raise ValueError on missing entries when populating
:param verbose: If True print verbose logging
"""
if len(urlparse(repo).scheme) <= 1:
if repo and len(urlparse(repo).scheme) <= 1 and not re.compile(self._VCS_SSH_REGEX).match(repo):
folder = repo
repo = None
else:
Expand Down

0 comments on commit b275520

Please sign in to comment.