Error: unable to create symlink .github/README.md: File name too long

Hello,

I’ve got a monorepo where a sub-package is an npm package. I have the readme in the root of the sub-package so that it is included and shown on npm when the package is published, however for this readme to be shown in github I need to make a symlink to this in the .github directory, based on the information here About READMEs - GitHub Docs, ie

If you put your README file in your repository’s hidden .github , root, or docs directory, GitHub will recognize and automatically surface your README to repository visitors.

However with this setup, the netlify build fails with:

Failed during stage “preparing repo”: error: unable to create symlink .github/LICENSE.md: File name too long


Details

Netlify site name: jade-truffle-8ae50a

Build link: Deploy details | Deploys | jade-truffle-8ae50a | Netlify

Looks like Git has caused some issue with the symlink: Symlinks: "File name too long" on MacOS · Issue #93 · dayhaysoos/use-shopping-cart · GitHub

Does a clone work on other devices?

I don’t think so, I had this issue on my machine, a windows device, and had to enable the git setting described here Filename too long in Git for Windows - Stack Overflow

It’s not possible to change Git config on Netlify + Netlify uses Ubuntu, so the Windows issue won’t apply anyways. Which brings me back to my question:

I only have a windows device so no idea how you expect me to test that?

Windows provides WSL to test Ubuntu.

OK, lets say I setup WSL then test this and it doesn’t work. I am assuming you or someone at netlify will then need to setup WSL to investigate a solution? If so, why don’t we just go directly to you or someone at netlify trying it if you already have wsl or an equivalent available and know how to use it?

I don’t have wsl setup and I’m reluctant to set it up just to test this

Hi, @eliasm307. I’m getting this same error when trying to clone the repo and I was not using Netlify when the error occurred. We recommend resolving the issue with the repo so that this error doesn’t occur when cloning it. Also, because this error isn’t being caused by Netlify, our support team cannot assist you with resolving it.

On the other hand, someone else here on this support forum might be willing to do so and, for this reason, it is reasonable to ask questions like this here. Please keep in mind, however, that the support team here at Netlify is here to provide technical support for Netlify and the services we provide. We do not have the resources to troubleshoot issues that are not related to Netlify directly. As this issue isn’t caused or created by Netlify, we cannot assist you with debugging it but someone else on this forum might.

If you disagree that this isn’t caused by Netlify or if there are other questions related to Netlify, please reply here anytime.

Also, this might be a good starting place for how to resolve this:

@luke thanks for the response and the explanation. Yes I realise it’s a git issue and the way I had got around it locally was via updating git config but if this isn’t an option for the netlify environments then fair enough.

Thanks for the link to a related thread, will look into that