Just a quick blog about an issue I hit when assigning an Azure Policy via AzOps for Enterprise Scale.
When you configure a layered Management Group Structure in Azure for Enterprise Scale, you can go to 6 levels in depth, however when it comes to storing Policy Definitions and Assignments the file name length can quickly exceed the Windows API max length of 260 characters. The main reason for this is that these json files are stored in Git with Guid values and somewhat long filenames.
Now, when cloning a Git Repo using a local VSCode and these files have to be created on the Windows Filesystem there is this limitation of 260 characters…… which I hit of course! By default Win10 has support for ‘LongPath’ which has been around for a few years now, it used to have to be toggled on via a registry mod:
In order to enable support for Long Paths, this setting has to be configured to a value of ‘1’.
But wait, my system was already set to that! So now what?
It appears that in my local Git, the system property also has to be set to use long paths:
git config --system core.longpaths true
No more errors! I guess there could be side effects by enabling this on your Git, but I will see what there are over time I am sure!
Hope this helps!
One thought on “MicroBlog – Filename too long in Git? Enable Long path support”
I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to find out where u got this from. thanks a lot