Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Unable to clone repository on Windows #205

Closed
shiftkey opened this issue Dec 15, 2014 · 11 comments
Closed

Unable to clone repository on Windows #205

shiftkey opened this issue Dec 15, 2014 · 11 comments

Comments

@shiftkey
Copy link

> git --version
git version 1.9.4.msysgit.1
> git clone https://github.com/CodeClub/scratch-curriculum.git
Cloning into 'scratch-curriculum'...
remote: Counting objects: 7756, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 7756 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (7756/7756), 144.76 MiB | 751.00 KiB/s, done.
Resolving deltas: 100% (3816/3816), done.
Checking connectivity... done.
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Cadı Yakalamaca.md (No such file or directory)
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Kulüp yöneticileri için bilgiler.md (No such file or directory)
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Kulüp yöneticileri için bilgiler.md (No such file or directory)
Checking out files: 100% (2048/2048), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Are we able to remove the special characters in these files?

EDIT: I don't mind submitting a PR to address the technical problem, but I'd love some pointers on how best to go about it to maintain i18n for these cultures...

@andylolz
Copy link
Contributor

Hi Brendan – thanks for flagging this!

You may have seen it already, but this wiki article looks as if it might be useful:
https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support

However, it does look a bit like this may be a problem with the scratch-curriculum repo… What do you think, @shiftkey?

@shiftkey
Copy link
Author

@andylolz it's an unfortunate limitation of the tooling in it's current state - you can create files on disk in Windows with paths that contain Unicode characters.

I'll get in touch with the msysgit team about this as well, but I fear their priorities are on porting Git v2 to Windows.

@andylolz
Copy link
Contributor

Great – thanks. Keep us posted on their response.

It’s interesting that it’s just these two files that appear to break, and not the many other unicode filenames in the repo… I wonder if it’s unrelated to unicode characters, and instead related to the trailing space in the directory name? Total guess!

I’ve just renamed the directory to remove that trailing space – would you try git fetch && git checkout -f HEAD (or something like that?!) and see if that has helped?

@andylolz
Copy link
Contributor

P.S. 8a45c69 suggests there’s definitely some sort of funny business going on here! I’m not sure why Kulüp yöneticileri için bilgiler.md appears twice…

@shiftkey
Copy link
Author

So I was able to workaround this error by following these instructions:

mkdir scratch
cd scratch
git init
git remote add origin https://github.com/CodeClub/scratch-curriculum.git
git fetch
git checkout origin/master -f
git checkout -b master

So I think something specific to cloning is triggering the issue. Thanks for nudging me to explore further!

@andylolz
Copy link
Contributor

whoa – that’s even weirder! I’m surprised that works, but git clone doesn’t – looks v similar to me.

I’m just testing on a windows box now. Taking a while – this repo is way too big…

@andylolz
Copy link
Contributor

Okay – I managed to recreate the error on a windows box by cloning the repo before 8a45c69 (the andylolz fork is in that state):

$ git --version
git version 1.9.4.msysgit.2

$ git clone https://github.com/andylolz/scratch-curriculum.git
Cloning into 'scratch-curriculum'...
remote: Counting objects: 7765, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 7765 (delta 5), reused 0 (delta 0)
Receiving objects: 100% (7765/7765), 144.78 MiB | 1.37 MiB/s, done.
Resolving deltas: 100% (3819/3819), done.
Checking connectivity... done.
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Cadı Yakalamaca.md (No such file or directory)
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Kulüp yöneticileri için bilgiler.md (No such file or directory)
error: unable to create file tr-TR/Term 1/02 Whack-a-Witch /Kulüp yöneticileri için bilgiler.md (No such file or directory)
Checking out files: 100% (2048/2048), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

…I then started again, and cloned the current CodeClub repo (i.e. including 8a45c69):

$ git clone https://github.com/CodeClub/scratch-curriculum.git
Cloning into 'scratch-curriculum'...
remote: Counting objects: 7769, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 7769 (delta 6), reused 0 (delta 0)
Receiving objects: 100% (7769/7769), 144.78 MiB | 595.00 KiB/s, done.
Resolving deltas: 100% (3820/3820), done.
Checking connectivity... done.
Checking out files: 100% (2047/2047), done.

…so I’m concluding that 8a45c69 fixed the issue :) You can try confirming this by re-cloning https://github.com/CodeClub/scratch-curriculum.git.

Thanks for reporting this, @shiftkey!

@ronnyfm
Copy link

ronnyfm commented Nov 27, 2015

I am facing the same thing, someone pushed "somedir /main.js". and breaks cloning in Windows, so, just renaming the folder should fix the issue?

@ronnyfm
Copy link

ronnyfm commented Nov 27, 2015

Also, is there a way to setup .gitignore to ignore directories like that for sake of compatibility?

@andylolz
Copy link
Contributor

Are you talking about this repo, @ronnyfm? Or a different one?

@ronnyfm
Copy link

ronnyfm commented Nov 28, 2015

Sorry, I realized after I commented that this was a very specific discussion hehe, but I was talking about a different repo where many directories were pushed with trailing spaces, I've fixed it now, and added this in .gitgnore to prevent future mistakes:
**/* /*

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

No branches or pull requests

3 participants