Cloning into 'C:\Users\Administrator\atlassian-bitbucket-pipelines-runner\bin\..\temp\72a91159-1101-5a49-8d06-9d84a88c1fef\1695799312869\build'...
error: unable to create file packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props: Filename too long
error: unable to create file packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0/build/net46/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props: Filename too long
Updating files: 72% (393/
Updating files: 100% (542/542), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Hello @Varun Kumar and welcome to the Community!
From the logs you have shared it seems you are using Bitbucket Windows self-hosted runners. The error message being returned "Filename too long" indicates this behavior is caused by a limitation in Windows OS, that by default only allows filenames/paths up to 260 characters. Since some files in your repository are exceeding that limit, when git is trying to save those files in the local folder, Windows is throwing the error.
I would suggest following the steps outlined in the below article to increase the filename limit on your Windows machine :
Although the article was originally written for Bamboo, since these are OS-level and git configurations, it should apply to Bitbucket Windows Runners as well.
Let me know in case you have any questions.
Thank you, @Varun Kumar !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.