mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix redaction
This commit is contained in:
parent
399871e6dd
commit
07db5a7038
2 changed files with 6 additions and 3 deletions
|
@ -817,7 +817,7 @@ def remote_set(cwd, name='origin', url=None, user=None, https_user=None,
|
|||
https_only=True)
|
||||
except ValueError as exc:
|
||||
raise SaltInvocationError(exc.__str__())
|
||||
cmd = 'git remote add {0} {1}'.format(name, url)
|
||||
cmd = 'git remote add {0} \'{1}\''.format(name, url)
|
||||
_git_run(cmd, cwd=cwd, runas=user)
|
||||
return remote_get(cwd=cwd, remote=name, user=None)
|
||||
|
||||
|
|
|
@ -264,12 +264,15 @@ def latest(name,
|
|||
if remote is None or remote[0] != desired_fetch_url:
|
||||
__salt__['git.remote_set'](target,
|
||||
name=remote_name,
|
||||
url=desired_fetch_url,
|
||||
url=name,
|
||||
user=user,
|
||||
https_user=https_user,
|
||||
https_pass=https_pass)
|
||||
ret['changes']['remote/{0}'.format(remote_name)] = (
|
||||
"{0} => {1}".format(str(remote), redacted_fetch_url)
|
||||
"{0} => {1}".format(
|
||||
salt.utils.url.redact_http_basic_auth(str(remote)),
|
||||
redacted_fetch_url
|
||||
)
|
||||
)
|
||||
# Set to fetch later since we just added the remote and
|
||||
# need to get the refs
|
||||
|
|
Loading…
Add table
Reference in a new issue