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

Error when git clone on Windows 10 and some files are not reflected #368

Closed
crfoxeam opened this issue Apr 18, 2022 · 1 comment · Fixed by #715
Closed

Error when git clone on Windows 10 and some files are not reflected #368

crfoxeam opened this issue Apr 18, 2022 · 1 comment · Fixed by #715
Assignees

Comments

@crfoxeam
Copy link

Bug report

Describe your environment

  • OS name and version: Windows 10 Home
  • Git version: 2.35.2

Describe the problem

When I do a git clone on this repository with Git for Windows, I get the following errors

error: invalid path 'src/content/pages/knowledgebase/android/what permissions does your app require and why?.md'
fatal: unable to checkout working tree

or

error: unable to create file src/content/pages/knowledgebase/android/what permissions does your app require and why?.md: Invalid argument

Steps to reproduce:

  1. git clone https://github.com/ivpn/ivpn.net.git

or

  1. git init
  2. git remote add origin https://github.com/ivpn/ivpn.net.git
  3. git config core.protectNTFS false
  4. git pull origin main

Observed Results:

Simply running git clone will result in an "invalid path" error.

git clone  https://github.com/ivpn/ivpn.net.git
Cloning into 'ivpn.net'...
remote: Enumerating objects: 12555, done.
remote: Counting objects: 100% (4952/4952), done.
remote: Compressing objects: 100% (1178/1178), done.
remote: Total 12555 (delta 3662), reused 4664 (delta 3472), pack-reused 7603
Receiving objects: 100% (12555/12555), 254.23 MiB | 9.20 MiB/s, done.
Resolving deltas: 100% (6984/6984), done.
error: invalid path 'src/content/pages/knowledgebase/android/what permissions does your app require and why?.md'
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 :/'

And if you do it the way I wrote above, starting with git init, I get an "unable to create file" error.

git pull origin main
remote: Enumerating objects: 10789, done.
remote: Counting objects: 100% (4220/4220), done.
remote: Compressing objects: 100% (1061/1061), done.
remote: Total 10789 (delta 3230), reused 3827 (delta 2954), pack-reused 6569
Receiving objects: 100% (10789/10789), 253.78 MiB | 7.60 MiB/s, done.
Resolving deltas: 100% (5809/5809), done.
From https://github.com/ivpn/ivpn.net
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
error: unable to create file src/content/pages/knowledgebase/android/what permissions does your app require and why?.md: Invalid argument
Updating files: 100% (1969/1969), done.

Expected Results:

It is expected that no errors will occur and that all files will be retrieved from the repository and reflected in the local repository.

Thank you.

@jurajhilje
Copy link
Member

jurajhilje commented Nov 21, 2023

The ? (question mark) is forbidden in file names on Windows.
This is now resolved in #715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants