VSTS (Visual Studio Team Services) custom build task to set git config for proxy. You can fetch repositories behind proxy (e.g. on-premises Github Enterprise in a private network) to a VSTS hosted agent.
VSTS staffs recommend using an on-premises agent! You should consider it at first. See microsoft/azure-pipelines-agent#1281
-
git clone this repository.
git clone https://github.com/tinoji/vsts-task-gitProxy
-
Download
VstsTaskSdk
, then copy it intask/ps_modules
.git clone https://github.com/Microsoft/vsts-task-lib cp -R vsts-task-lib/powershell/VstsTaskSdk vsts-task-gitProxy/task/ps_modules
-
Install vsts cli commannd and log in to your VSTS account.
-
Upload a task to your account.
cd vsts-task-gitProxy/task tfx build tasks upload
Enter path in the task path prompt.
TFS Cross Platform Command Line Interface v0.4.11 Copyright Microsoft Corporation > Task path: .
Add the task in your build definition.
Put the task in the top order.
Enter your proxy configuration.
Running powershell before Get Sources in VSTS / TFS Build
microsoft/azure-pipelines-agent#1281
MIT