Fix repository URL contains credentials even when agent.force_git_ssh_protocolagent.force_git_ssh_protocol is true

This commit is contained in:
allegroai 2022-06-16 23:20:53 +03:00
parent 560e689ccd
commit 9acbad28f7

View File

@ -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)