professional-services icon indicating copy to clipboard operation
professional-services copied to clipboard

Unable to clone repo on windows

Open IanMoroney opened this issue 9 months ago • 1 comments

It looks like there's an issue with the folder path tools/bqman/testdata/TestProcessPatch/bq-metadata-manager:sec_au.calculation.schema and tools/bqman/testdata/TestProcessUpdate/bq-metadata-manager:sec_au.calculation.schema and git is unable to checkout this repo because of these files.

git clone https://github.com/GoogleCloudPlatform/professional-services.git
Cloning into 'professional-services'...
remote: Enumerating objects: 60713, done.
remote: Counting objects: 100% (180/180), done.
remote: Compressing objects: 100% (117/117), done.
Receiving objects: 100% (60713/60713), 361.85 MiB | 14.24 MiB/s, done.33Receiving objects: 100% (60713/60713), 359.45 MiB | 9.63 MiB/s

Resolving deltas: 100% (19910/19910), done.
error: invalid path 'tools/bqman/testdata/TestProcessPatch/bq-metadata-manager:sec_au.calculation.schema'
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 :/'

Also tried a git sparse-checkout:

git clone -n --depth=1 --filter=tree:0 https://github.com/GoogleCloudPlatform/professional-services.git
Cloning into 'professional-services'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Receiving objects: 100% (1/1), done.

git sparse-checkout set --no-cone tools/ipam-autopilot
git checkout
remote: Enumerating objects: 1878, done.
remote: Counting objects: 100% (1878/1878), done.
remote: Compressing objects: 100% (1205/1205), done.
remote: Total 1878 (delta 10), reused 1616 (delta 9), pack-reused 0Receiving objects:  97% (1822/1878)
Receiving objects: 100% (1878/1878), 245.76 KiB | 4.92 MiB/s, done.
Resolving deltas: 100% (10/10), done.
error: invalid path 'tools/bqman/testdata/TestProcessPatch/bq-metadata-manager:sec_au.calculation.schema'
error: invalid path 'tools/bqman/testdata/TestProcessUpdate/bq-metadata-manager:sec_au.calculation.schema'

IanMoroney avatar Nov 07 '23 10:11 IanMoroney

I think so too - there are files with a colon (":") in the name, which is illegal on Windows (more accurately, NTFS, which is most likely the file system you're using).

Work-around:

  • Create an ext4 partition under Windows and clone there :-) (not sure if this would actually even work TBH - how would the Windows applications react to these filenames?)
  • More seriously: sparse check-out and ignore tools/bqman directory: see stackoverflow

Fix:

  • Remove/update these files. @boredabdel you seem to have been involved (2 years ago...). Could you take a look?

pbalm avatar Nov 07 '23 12:11 pbalm