首页 > 解决方案 > VSTS - External Git

问题描述

I've tried to get VSTS to connect to our enterprise Git repository.

To do this I had to get our firewall opened up, and as a result we found that VSTS does not connect to our network using the VSTS domain, ie ########.visualstudio.com

Instead it connects using the IP address of the build agent, which is in the range specified in the Azure Public IP list.

Does anyone know if this is a bug on MS's part? We could free up our firewall to all the Azure Public IP's, but this is very fragile (they can/will change), and presents a significant security risk as anyone using Azure could attempt to connect to our Git repository.

Interestingly, if you install a private build agent, then VSTS connects to this using the VSTS domain, we have observed this.

标签: azure-devops

解决方案


在我看来,这是因为 Hosted Build IP 不断更新。您可以查看以下问答:

Hosted Build 使用哪些 IP 地址?

我们每周三发布一个 XML 文档,其中包含按区域划分的 Azure 数据中心的所有 IP 范围。请参阅 https://www.microsoft.com/en-us/download/confirmation.aspx?id=41653:此文件包含 Microsoft Azure 数据中心使用的计算 IP 地址范围(包括 SQL 范围)。每周三(太平洋时间)将上传一个新的 xml 文件,其中包含新的计划 IP 地址范围。新的 IP 地址范围将于下周一(太平洋时间)生效。请在星期一之前下载新的 xml 文件并在您的网站上执行必要的更改。托管代理应与您的 VSTS 帐户位于同一区域,您需要将您所在区域的 IP 地址范围列入白名单,您可以从上面的链接获得。要在 VSTS 中验证您的区域,请导航到位于 .visualstudio.com/_admin/_home/settings 的“设置”页面,在“帐户”下,您将看到“区域”字段。


推荐阅读