visual-studioazure-devopsgit-tfs

git-tfs: checkin command throw error policy


I have a TFS repository on Azure DevOps Server Version 17.143.28621.4 I installed git-tfs V 0.30 downloaded from github.

I cloned the repository, and I am able to fetch, pull, commit and create shelveset.

I have trouble during the checkin operation:

enter image description here

On my pc I have installed both visual studio 2017 and 2019. I am currently able to checkin to TFS with visual studio.

What I tried:

I have read this troubleshooting page, but I can't understand what to do.

This is the result of git tfs info: enter image description here

I have tried to execute the enable_checkin_policies_support.bat. The execution doesn't give error but the checkin command shows the same error.

I also checked, as the troubleshooting says, the registry keys but I didn't find what is shown in the troubleshooting page:

enter image description here

What am I missing?


Solution

  • Currently able to checkin to TFS with visual studio.

    According to this troubleshooting page, you should known that based on this, this issue caused can be narrow down to git-tfs could not find the check-in policy successfully.


    According to your git tfs info, your TFS client library is 14 which is Visual Studio 2015.

    In your PC, you said that the newest version of VS in your machine is 16.0 (Visual studio 2019). So, here the Git-tfs does not picking the same version of Visual Studio, because:

    > Git-tfs by default prefers the newest version of Visual Studio.

    To tell the Git-tfs to use the specified client library, just go Control Panel, add a environment variable GIT_TFS_CLIENT, and assign its value as the visual studio 2015(in your scenario):

    enter image description here