I have installed an azure-pipeline-agent on a virtual machine. I am using git submodules. The submodules are mirrored on multiple locations. Since the build-agent user cannot and should not have access to all of the mirrored submodules, I use the following setting in the gitconfig file located under (AzureBuildAgent\externals\git\mingw64\etc):
[url "https://[email protected]/xxx/_git/"]
insteadOf = ssh://[email protected]
This works exactly how I intend it to do. My problem is that my gitconfig file gets overwritten with a default file without my setting, after a few days.
This seems to happen during a SelfUpdate:
25.10.2019 09:30 <JUNCTION> externals [C:\AzureBuildAgent\externals.2.159.2]
[05.11.2019 10:24:32,82] Delete existing junction externals folder
[05.11.2019 10:24:32,82] Create junction bin folder
Junction created for C:\AzureBuildAgent\bin <<===>> C:\AzureBuildAgent\bin.2.160.0
[05.11.2019 10:24:32,84] Create junction externals folder
Junction created for C:\AzureBuildAgent\externals <<===>> C:\AzureBuildAgent\externals.2.160.0
[05.11.2019 10:24:32,84] Update succeed
[05.11.2019 10:24:32,84] Rename "C:\AzureBuildAgent\_diag\SelfUpdate-20191105-092430.log" to be "C:\AzureBuildAgent\_diag\SelfUpdate-20191105-092430.log.succeed"
Is there a way to prevent the azure-build-agent to do so, or configure it in some other manner to keep my url replacement?
Thanks in advance.
@averelon - Have you tried putting those settings in the global git config for the user running the agent instead of modifying the system gitconfig of git supplied with the agent? It should be C:\Users\
Dear Tommy,
I have removed the url replacement from the system settings and moved it into the recommended location and the build still works like a charm.
Thanks a lot for your advice.
Many greetings,
averelon
@averelon - No problem at all. I am glad I was able to help!
Most helpful comment
@averelon - Have you tried putting those settings in the global git config for the user running the agent instead of modifying the system gitconfig of git supplied with the agent? It should be C:\Users\.gitconfig