Skip to content

Commit 47a502c

Browse files
kounoikeguyzmo
authored andcommitted
Adds missing ssh:// URL support.
1 parent b14e648 commit 47a502c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git_repo/services/service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ def format_path(self, repository, namespace=None, rw=False):
246246
if not rw and '/' in repo:
247247
return '{}/{}'.format(self.url_ro, repo)
248248
elif rw and '/' in repo:
249-
return '{}:{}'.format(self.url_rw, repo)
249+
if self.url_rw.startswith('ssh://'):
250+
return '{}/{}'.format(self.url_rw, repo)
251+
else:
252+
return '{}:{}'.format(self.url_rw, repo)
250253
else:
251254
raise ArgumentError("Cannot tell how to handle this url: `{}/{}`!".format(namespace, repo))
252255

0 commit comments

Comments
 (0)