diff --git a/lib/ansible/modules/git.py b/lib/ansible/modules/git.py index 6142933b511..8273b0be001 100644 --- a/lib/ansible/modules/git.py +++ b/lib/ansible/modules/git.py @@ -1031,7 +1031,7 @@ def fix_remote_tracking_branch(git_path, module, dest, remote, version, single_b else: fetch_ref = '+refs/heads/*:refs/remotes/origin/*' - cmd = [git_path, 'config', 'remote.origin.fetch', fetch_ref] + cmd = [git_path, 'config', 'remote.%s.fetch' % remote, fetch_ref] (rc, out, err) = module.run_command(cmd, cwd=dest) if rc != 0: module.fail_json(