runner: [Windows] Runner failing to extract project - Path too long

Describe the bug After succesfully setting up the first runner for our docs website, i moved on to the next. And here the extraction of the project is failing, as the path exceeds the max length allowed on windows.

`Exception calling “ExtractToDirectory” with “2” argument(s): “Could not find a part of the path ‘C:\actions-runner-my-r elewise_work\my.relewise.com\my.relewise.com\main\b7fc4a2e-4d2a-4ec4-a651-46d82e1b6b6c\brianhdk-my.relewise.com-77928d 6004bfaa38b59effe973533d51b9455863\src\Infrastructure.Database.Migrations\M1636740262_RemoveColumnsFromTriggersTables.c s’.” At line:1 char:111

  • … catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\a …`

I noticed the path that the runner is building, is somehow including 2 GUIDs…

Path: C:\actions-runner-my-relewise_work\my.relewise.com\my.relewise.com\b7fc4a2e-4d2a-4ec4-a651-46d82e1b6b6c\brianhdk-my.relewise.com-77928d6004bfaa38b59effe973533d51b9455863

Why is it doing this? Where are these 2 “GUID” folders coming from? The path it creates for our docs site is:

C:\actions-runner_work\docs.relewise.com\docs.relewise.com

No double nested GUID folders.

the .tar file it downloads is: b7fc4a2e-4d2a-4ec4-a651-46d82e1b6b6c.tar.gz where is this guid coming from?

Expected behavior Shouldnt extract into these crazy long paths.

Runner Version and Platform

2-288.1

Windows server 2019

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (1 by maintainers)

Most upvoted comments

This seems to happen only when git is not installed on the machine.

The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
Writing archive to disk
Extracting the archive

After installing git, the checkout action worked fine.

I have fixed the issue by using to following https://gist.github.com/leodutra/a25bc1f51e8779943df0a95d5a4839d1 to make the Windows machine allow for longer path names. That fixed the issue we were having with path and file names being to long.

Thanks @RAORelewise, we’re investigating your issue. I’ll get back to you as soon as I have more information.