Checkout: Cannot checkout file with long file name

Created on 11 May 2020  路  2Comments  路  Source: actions/checkout

There was an error for file name too long when running the "checking out the ref" step:

[error]error: unable to create file sdk/recoveryservices.backup/mgmt-v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/ProtectedItemProtectionContainerBackupFabricVaultProtectedItemResourceImpl.java: Filename too long

I was not able to run any other actions for my repository due to this issue. What is the upper limit of file path name length and could we increase or remove such limit? Thank you!

Most helpful comment

Cool that works! Yes it is on windows-latest, and the following is able to work around the problem:

runs-on: windows-latest
steps:
- name: git configure long path
run: git config --global core.longpaths true
- uses: actions/checkout@v2

All 2 comments

Is it on Windows? Are you using the hosted runners?

As a workaround you might be able to set git config --global core.longpaths true before the checkout step.

Cool that works! Yes it is on windows-latest, and the following is able to work around the problem:

runs-on: windows-latest
steps:
- name: git configure long path
run: git config --global core.longpaths true
- uses: actions/checkout@v2

Was this page helpful?
0 / 5 - 0 ratings