TF.exe Git权限认证问题

TF.exe Git Permission Authentication Issue

我正在尝试创建一个脚本,为我在 Azure DevOps 中的存储库添加 CreateBranch 权限。我可以从 Powershell 执行登录和 运行 我的 git 命令,但是当需要使用 tf.exe 时,我收到身份验证错误。这是我目前的设置:

tf.exe git permission /deny:CreateBranch /group:[$project]\Contributors /collection:https://dev.azure.com/$organization/ /teamproject:$project /repository:$reponame

这是我的 tf.exe.config 代理设置:

<system.net>
    <settings>
        <ipv6 enabled="true"/>
        <servicePointManager expect100Continue="false" />
    </settings>
    <defaultProxy useDefaultCredentials="true" enabled="true">
        <proxy usesystemdefault="True" />
    </defaultProxy>
</system.net>

当我 运行 我的脚本时,出现以下错误:

Setting branch policies

TF400324: Team Foundation services are not available from server https://dev.azure.com/ORGANIZATION. Technical information (for administrator): Unable to connect to the remote server

这两天一直在循环Google和Bing,一直没能修好。有人有什么想法吗?

这种问题通常表示存在一些导致连接失败的网络问题。

发送时出现意外错误。没有成功在代理后面使用 tf 命令。

请先删除您环境中的代理设置,并在使用该 tf.exe git 权限命令时指定 /login 参数 /login:FabrikamUser@hotmail.com,FabrikamPassword

如果您使用个人访问令牌,您还可以指定 /login:PAT Token

您也可以按照评论的建议直接从您所在的同一台计算机上的浏览器访问 dev.azure.com/$organization 运行 此命令。如果问题与您的网络环境或 tf.exe 命令端相关,这将有助于缩小范围。