From 9acbad28f7a5b4a71bc9ccdc56f391c361827053 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 16 Jun 2022 23:20:53 +0300 Subject: [PATCH] Fix repository URL contains credentials even when agent.force_git_ssh_protocolagent.force_git_ssh_protocol is true --- clearml_agent/helper/package/external_req.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clearml_agent/helper/package/external_req.py b/clearml_agent/helper/package/external_req.py index fc1a0c4..40f348a 100644 --- a/clearml_agent/helper/package/external_req.py +++ b/clearml_agent/helper/package/external_req.py @@ -95,7 +95,8 @@ class ExternalRequirements(SimpleSubstitution): vcs._set_ssh_url() new_req_line = 'git+{}{}{}'.format( '' if scheme and '://' in vcs.url else scheme, - vcs.url_with_auth, fragment + vcs_url if session.config.get('agent.force_git_ssh_protocol', None) else vcs.url_with_auth, + fragment ) if new_req_line != req_line: furl_line = furl(new_req_line)