我正在尝试使用Ansible更新git仓库源。我要模仿的命令是git remote set-url origin new.git.url/here
。有谁知道我该怎么做?我正在尝试不重新克隆存储库。
参见git_config。例如,给定Git存储库test.git
shell> git init --bare test.git
下面的剧本可以胜任
- hosts: localhost
tasks:
- git_config:
repo: 'test.git'
scope: 'local'
name: 'remote.origin.url'
value: 'new.git.url/here'
shell> cd test.git && git config remote.origin.url
new.git.url/here
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句