@@ -174,7 +174,9 @@ def _clone_command_for_github_like(git_config, dest_dir):
174
174
CalledProcessError: If failed to clone git repo.
175
175
"""
176
176
is_https = git_config ["repo" ].startswith ("https://" )
177
- is_ssh = git_config ["repo" ].startswith ("git@" )
177
+ #is_ssh = git_config["repo"].startswith("git@")
178
+ is_ssh = git_config ["repo" ].startswith ("ssh://" )
179
+ print (git_config ['repo' ])
178
180
if not is_https and not is_ssh :
179
181
raise ValueError ("Invalid Git url provided." )
180
182
if is_ssh :
@@ -277,14 +279,19 @@ def _run_clone_command(repo_url, dest_dir):
277
279
if repo_url .startswith ("https://" ):
278
280
my_env ["GIT_TERMINAL_PROMPT" ] = "0"
279
281
subprocess .check_call (["git" , "clone" , repo_url , dest_dir ], env = my_env )
280
- elif repo_url .startswith ("git@" ):
282
+ #elif repo_url.startswith("git@"):
283
+ elif repo_url .startswith ("ssh://" ):
281
284
with tempfile .NamedTemporaryFile () as sshnoprompt :
282
285
write_pipe = open (sshnoprompt .name , "w" )
283
286
write_pipe .write ("ssh -oBatchMode=yes $@" )
284
287
write_pipe .close ()
285
288
os .chmod (sshnoprompt .name , 0o511 )
286
- my_env ["GIT_SSH" ] = sshnoprompt .name
289
+ #my_env["GIT_SSH"] = sshnoprompt.name
290
+ #import time
291
+ #time.sleep(1)
292
+
287
293
subprocess .check_call (["git" , "clone" , repo_url , dest_dir ], env = my_env )
294
+ #print(subprocess.run(["git", "clone", repo_url, dest_dir], env=my_env, stdout=subprocess.PIPE ,stderr=subprocess.STDOUT))
288
295
289
296
290
297
def _insert_token_to_repo_url (url , token ):
0 commit comments