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" '\' #9904

Closed
nikolapeja6 opened this issue May 31, 2020 · 2 comments · Fixed by #10077
Closed

Cloning: error: filename in tree entry contains backslash" '\' #9904

nikolapeja6 opened this issue May 31, 2020 · 2 comments · Fixed by #10077
Labels
bug Confirmed bugs or reports that are very likely to be bugs windows Issues specific Desktop usage on Windows

Comments

@nikolapeja6
Copy link

Describe the bug

When cloning the MicrosoftDocs/azure-docs repository though the GitHub Desktop app, it failed. The logs showed the following error:

error: [ui] `git -c credential.helper= -c protocol.version=2 clone --recursive --progress -- https://github.com/MicrosoftDocs/azure-docs.git C:\_repos\azure-docs` exited with an unexpected code: 128.
...
Receiving objects:  80% (2707986/3353572), 8.32 GiB | 17.28 MiB/s
error: filename in tree entry contains backslash: '\media'
fatal: Not all child objects of cfb022b5e95f43eb589592e5c3633fc41f36dba4 are reachable
fatal: index-pack failed

From the logs, the command that executed the clone was this:

git -c credential.helper= -c protocol.version=2 clone --recursive --progress -- https://github.com/MicrosoftDocs/azure-docs.git C:\_repos\azure-docs

However, when I tried to manually execute the command it passed. Not sure what is causing the problem.

Version & OS

GitHub Desktop Version 2.5.0 on Windows 10 (also tried on Windows Server, failed there as well).

Steps to reproduce the behavior

Clone the repo https://github.com/MicrosoftDocs/azure-docs form the GitHub Desktop application.

Expected behavior

Cloning should be successful.

Actual behavior

Cloning fails.

@steveward
Copy link
Member

@nikolapeja6 thanks for the report. It looks like you are running into git-for-windows/git#2435. When we update the version of Git that ships with GitHub Desktop it should resolve this issue. Here's the relevant bit from the release notes:

  • An earlier update to Git for Windows declared that a tree object is
    invalid if it has a path component with backslash in it, which was
    overly strict, which has been corrected. The only protection the
    Windows users need is to prevent such path (or any path that their
    filesystem cannot check out) from entering the index.
    (merge 224c7d70fa js/mingw-loosen-overstrict-tree-entry-checks later to maint).

Full Release Notes

@steveward steveward added the windows Issues specific Desktop usage on Windows label Jun 2, 2020
@niik niik added the bug Confirmed bugs or reports that are very likely to be bugs label Jun 15, 2020
@niik niik changed the title Cloning of repo from GitHub Desktop fails, but succeeds from cmd Cloning: error: filename in tree entry contains backslash" '\' Jun 16, 2020
@steveward
Copy link
Member

A workaround for this bug can be found in this comment in issue #10004 by @niik.

@steveward steveward pinned this issue Jun 16, 2020
@rafeca rafeca mentioned this issue Jun 16, 2020
@tierninho tierninho unpinned this issue Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs windows Issues specific Desktop usage on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@niik @steveward @nikolapeja6 and others