Filename too long error for windows-2019 checkout

When using “actions/checkout@v1” on windows-2019. The job is failing with the error ’ cannot create directory at ### Filename too long’.

steps:
    - uses: actions/checkout@v1
      with:
        ref: master

Is there a way to enable longpaths support for the job on windows?

Managed to achieve this by using the below

steps:
    - name: Support longpaths
      run: git config --system core.longpaths true
2 Likes

You can use this to just apply longpaths when you do the cloning.

There are reasons why longpaths isn’t enabled globally.

git clone -c core.longpaths=true https://yourrepo.git