I am trying to take a git clone from a particular branch of my bitbucket repository using the below command: git clone <url> --branch <branchname>
.
However, I am getting the below error while taking the clone:
error:unable to create file foldername/nodemodules/......: Filename too long.
I tried resolving this by running the below command in my git cmd git config --system core.longpaths true
.
But I am getting:
error: could not lock config file c://.gitconfig: Permission denied error: could not lock config file c://.gitconfig: Invalid argument.
How do I solve these two errors?
Go to Computer Configuration → Administrative Templates → System → Filesystem in gpedit. msc , open Enable Win32 long paths and set it to Enabled.
windows-10-git.mdGo to Computer Configuration > Administrative Templates > System > Filesystem in gpedit. msc , open Enable Win32 long paths and set it to Enabled .
If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.
git config --system core.longpaths true
Another way (only for this clone):
git clone -c core.longpaths=true <repo-url>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With