I am trying to create a script that adds CreateBranch
permissions to my repos in Azure DevOps . I am able to do login and run my git commands from Powershell , but when it comes time to use tf.exe
, I get authentication errors. This is what I have setup so far:
tf.exe git permission /deny:CreateBranch /group:[$project]\Contributors /collection:https://dev.azure.com/$organization/ /teamproject:$project /repository:$reponame
Here is my tf.exe.config for my proxy settings:
<system.net>
<settings>
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false" />
</settings>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True" />
</defaultProxy>
</system.net>
And when I run my script, I get the following error:
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
I have been circulating Google and Bing for the past couple of days and I have not been able to fix it. Does anyone have any ideas?
This kind of issue usually indicate there is some network issue which caused the connection failed.
An unexpected error occurred on a send. Hadn't succeed to use tf command behind a proxy.
Please first remove the proxy setting in your environment and specify /login
parameter when using that tf.exe git permission command /login:FabrikamUser@hotmail.com,FabrikamPassword
If you are using Personal Access Token, you could also specify /login:PAT Token
You could also follow comment's suggestion directly access dev.azure.com/$organization from browser on same machine where you are running this command. It will help to narrow down if issue related to your network environment or tf.exe
command side.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.