Commit 8170e989354ef51e398f52b978b8388fe9f54aa2

Stefan Sperling 2020-03-20T12:06:54

put a proper SSH URL into cloned repositories, rather than 'scp' style syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/got/got.c b/got/got.c
index 740999c..30f18d7 100644
--- a/got/got.c
+++ b/got/got.c
@@ -962,7 +962,8 @@ cmd_clone(int argc, char *argv[])
 		    "sendfd unveil", NULL) == -1)
 			err(1, "pledge");
 #endif
-		if (asprintf(&git_url, "%s:%s", host, server_path) == -1) {
+		if (asprintf(&git_url, "ssh://%s:%s/%s", host, port,
+		    server_path) == -1) {
 			error = got_error_from_errno("asprintf");
 			goto done;
 		}