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

Git checkout fails on Windows #13608

Closed
keeganwitt opened this issue Nov 29, 2022 · 1 comment · Fixed by #13613
Closed

Git checkout fails on Windows #13608

keeganwitt opened this issue Nov 29, 2022 · 1 comment · Fixed by #13613

Comments

@keeganwitt
Copy link
Contributor

keeganwitt commented Nov 29, 2022

Cloning (or pulling) the repository now fails.

$ git clone https://github.com/docker-library/official-images.git
Cloning into 'official-images'...
remote: Enumerating objects: 93744, done.
remote: Counting objects: 100% (228/228), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 93744 (delta 132), reused 183 (delta 100), pack-reused 93516
Receiving objects: 100% (93744/93744), 21.82 MiB | 15.65 MiB/s, done.
Resolving deltas: 100% (64747/64747), done.
error: invalid path '.external-pins/mcr.microsoft.com/windows/nanoserver:1809'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

The Windows file naming convention states that the following are reserved characters

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

So in this case, the issue is with the colon character. Is it possible to rename those files (nanoserver:1809, nanoserver:ltsc2022, servercore:1809, servercore:ltsc2022)?

@keeganwitt keeganwitt changed the title Clone and update fail on Windows Git checkout fails on Windows Nov 29, 2022
@tianon
Copy link
Member

tianon commented Nov 29, 2022

Doh, yep -- as noted in #13567 (comment), I tested this, but only with MSYS touch that comes with Git for Windows, so I (wrongly) assumed Git would make the same intelligent conversions automatically that MSYS does.

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

Successfully merging a pull request may close this issue.

2 participants