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

Cloning error - 'filename in tree entry contains backslash: '\'' #10004

Closed
jjwagner opened this issue Jun 15, 2020 · 2 comments
Closed

Cloning error - 'filename in tree entry contains backslash: '\'' #10004

jjwagner opened this issue Jun 15, 2020 · 2 comments

Comments

@jjwagner
Copy link

Describe the bug

Cloning fails with a huge wall of useless text and no visible button to clear it.

Version & OS

Github desktop 2.5.2
Windows 10 Pro 2004

Steps to reproduce the behavior

  1. Go to File->Clone Repository...
  2. Click on URL, then paste 'https://github.com/jjwagner/moodle' as URL
  3. Select a local path
  4. Click Clone
  5. "Receiving objects" will climb to about 68%, then apparently crash?
  6. folder disappears from filesystem
  7. Click on Help->Show logs in Explorer to see logs.

Expected behavior

I expected a clean fork of a popular project to clone using Github Desktop

Actual behavior

Github desktop crashes without any sort of explanation

Screenshots

Add screenshots to help explain your problem, if applicable.

Logs

2020-06-15T00:25:21.771Z - error: [ui] git -c credential.helper= -c protocol.version=2 clone --recursive --progress -- https://github.com/jjwagner/moodle.git D:\GitHub\moodle exited with an unexpected code: 128.

many lines later:

error: filename in tree entry contains backslash: ''

Additional context

@jjwagner
Copy link
Author

Googling the error reveals that this was a problem for the Windows Git cli client. There's a workaround, discussed here:

https://github.saobby.my.eu.orgmunity/t/windows-git-clone-error-error-filename-in-tree-entry-contains-backslash-32-mib-s/2935

I can't find any way to run git commands with the Desktop, so I can't see how this workaround will help me.

@niik
Copy link
Member

niik commented Jun 15, 2020

Hi @jjwagner, thanks for opening this and I'm sorry that you've encountered this problem! This seems to be the same issue as #9904 and it's caused by a protective measure added to mitigate a security vulnerability in Git for Windows (the official command line interface that GitHub Desktop relies on behind the scenes). In moodle/moodle@b4ede3f a file was created containing a \ character in its filename. This is forbidden on Windows and while it was swiftly removed in moodle/moodle@9a1a27b it's still triggering this behavior.

We're working on upgrading our built-in version of Git to a version which fixes this problem but until that release ships the temporary workaround is to either set the core.protectNTFS config variable as stated in the link you provided.

I can't find any way to run git commands with the Desktop, so I can't see how this workaround will help me.

GitHub Desktop doesn't ship a command line interface but you can download the Git command line tools for Windows from https://git-scm.com/download/win. It's also possible to open the Git config file in an editor and add it manually (the config file is located in your home directory and is named .gitconfig).

image

[core]
	protectNTFS = false

Please be aware that this will disable the security vulnerability protection mechanism until you remove that section again.

Cloning fails with a huge wall of useless text and no visible button to clear it.

Thanks for pointing this out, this has recently been addressed in #9945 and this is what I see when I attempt to clone that repository now. That fix will be included in the next production release of Github Desktop.

Screen Shot 2020-06-15 at 13 14 16

I'm going to close this issue in favor of #9904 so please follow along there for a notice of when we're getting ready to ship a fix.

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

2 participants