Skip to content

Commit 4d465c5

Browse files
committed
Don't change link for git
1 parent 07e758d commit 4d465c5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/fosslight_util/download.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ def change_src_link_to_https(src_link):
6363
return src_link
6464

6565

66-
def change_ssh_link_to_https(src_link):
67-
src_link = src_link.replace("[email protected]:", "https://github.com/")
68-
return src_link
69-
70-
7166
def parse_src_link(src_link):
7267
src_info = {"url": src_link}
7368
src_link_changed = ""
@@ -77,7 +72,7 @@ def parse_src_link(src_link):
7772
if src_link.startswith("git://github.com/"):
7873
src_link_changed = change_src_link_to_https(src_link_split[0])
7974
elif src_link.startswith("[email protected]:"):
80-
src_link_changed = change_ssh_link_to_https(src_link_split[0])
75+
src_link_changed = src_link_split[0]
8176
else:
8277
if "rubygems.org" in src_link:
8378
src_info["rubygems"] = True
@@ -244,7 +239,7 @@ def download_git_clone(git_url, target_dir, checkout_to="", tag="", branch="", s
244239
success = False
245240
else:
246241
if ssh_key:
247-
logger.info(f"Download git with ssh_key")
242+
logger.info(f"Download git with ssh_key:{git_url}")
248243
git_ssh_cmd = f'ssh -i {ssh_key}'
249244
with Git().custom_environment(GIT_SSH_COMMAND=git_ssh_cmd):
250245
success, oss_version = download_git_repository(refs_to_checkout, git_url, target_dir, tag)

0 commit comments

Comments
 (0)