Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub REST API checkout Windows long file path issues #1285

Open
jeffpapp opened this issue Apr 12, 2023 · 4 comments
Open

GitHub REST API checkout Windows long file path issues #1285

jeffpapp opened this issue Apr 12, 2023 · 4 comments

Comments

@jeffpapp
Copy link

When running on a Windows self hosted runner and using the GitHub REST API checkout method, I'm running into problems with long file names causing the unzip step to file. A big part of this is the generated folder structure that checkout creates in the format of <uuid>\<owner>-<repo>-<hash>. This creates 91 characters which is almost 35% of the Windows file path limit.

It would be nice if we could at least customize this somehow to reduce the size of the folder path it unzips to.

@nick-morhun
Copy link

On a self-hosted runner, you can at least fix it with something like
git config --system core.longpaths true

@Muralikrishna-Philips
Copy link

tried all the ways still facing the long path issue.

@AdamFafinski
Copy link

AdamFafinski commented Aug 10, 2023

Having same issue, for newer versions of Windows you can enable long paths like so:
https://www.thewindowsclub.com/how-to-enable-or-disable-win32-long-paths-in-windows-11-10
and it works.

However in Windows Server 2012 r2 there is no option to do this.
Would be nice to have ability to download/extract repo under custom name maybe, is it possible?

@wangito33
Copy link

Similar to #1018, it would be nice to add this config directly to "checkout".

pytorchmergebot pushed a commit to pytorch/pytorch that referenced this issue Oct 20, 2024
Checking out PyTorch on Windows starts to fail after ROCm change #131004 in which one of the submodule path, `third_party/composable_kernel`, is getting too long https://hud.pytorch.org/pr/pytorch/pytorch/131004#31778700376

According to actions/checkout#1285, there is no fix in GHA checkout, but we can set `git config --system core.longpaths true` to enable long paths support in Git as a workaround.

### Testing

Windows checkout is ok now https://github.com/pytorch/pytorch/actions/runs/11423112351/job/31781916540

Pull Request resolved: #138411
Approved by: https://github.com/wdvr
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this issue Oct 20, 2024
Checking out PyTorch on Windows starts to fail after ROCm change #131004 in which one of the submodule path, `third_party/composable_kernel`, is getting too long https://hud.pytorch.org/pr/pytorch/pytorch/131004#31778700376

According to actions/checkout#1285, there is no fix in GHA checkout, but we can set `git config --system core.longpaths true` to enable long paths support in Git as a workaround.

### Testing

Windows checkout is ok now https://github.com/pytorch/pytorch/actions/runs/11423112351/job/31781916540

Pull Request resolved: #138411
Approved by: https://github.com/wdvr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants