Fix protocol auto-detection for ssh
authorDaniel Koch <dkoch@nvidia.com>
Fri, 9 Dec 2016 21:38:50 +0000 (16:38 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Mon, 12 Dec 2016 08:37:05 +0000 (03:37 -0500)
oss-cts issue 21

Change-Id: Id0bf39fc6d9eb64ef9415e5101a9a8bd042848aa

external/fetch_sources.py

index bb14093..84de2bc 100644 (file)
@@ -163,7 +163,7 @@ class GitRepo (Source):
 
                        if proc.returncode != 0:
                                raise Exception("Failed to execute 'git ls-remote origin', got %d" % proc.returncode)
-                       if stdout[:3] == 'ssh':
+                       if (stdout[:3] == 'ssh') or (stdout[:3] == 'git'):
                                protocol = 'ssh'
                        else:
                                assert stdout[:5] == 'https'