简体   繁体   English

无法从github克隆git存储库

[英]Cannot clone a git repository from github

I am trying to clone a github repository to my local windows machine url: https://github.com/Patrick-The-Star/codility-lessons.git . 我正在尝试将github存储库克隆到本地Windows机器URL: https : //github.com/Patrick-The-Star/codility-lessons.git But I get this result : 但是我得到这个结果:

Cloning into 'codility-lessons'...
remote: Counting objects: 349, done.
emote: Total 349 (delta 0), reused 0 (delta 0), pack-reused 349
Receiving objects: 100% (349/349), 2.38 MiB | 1.09 MiB/s, done.
Resolving deltas: 100% (115/115), done.
Checking connectivity... done.
fatal: cannot create directory at 'lesson 1 : Time Complexity': Invalid argument
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 researched a little and it seems I need to have enough disk space and I do. 我做了一些研究,看来我需要有足够的磁盘空间。 I assume it is because of the file name and it has spaces in the file "lesson 1 : Time complexity" I am not sure though. 我认为这是因为文件名,并且在文件“课程1:时间复杂性”中有空格,但我不确定。 Either way how do I solve this problem? 无论哪种方式,我该如何解决这个问题?

how do I clone files with colons in the filename 如何克隆文件名中带有冒号的文件

basically you can't clone this repository on windows. 基本上,您不能在Windows上克隆此存储库。 You need to change the names of the folders or use an OS that allows colons in filenames, ie not windows 您需要更改文件夹的名称或使用允许在文件名中使用冒号的操作系统,即Windows

EDIT: I forked the repository and changed the colons to dashes. 编辑:我分叉存储库,并将冒号更改为破折号。 you should be able to clone this: https://github.com/prettyClouds/codility-lessons 您应该能够克隆此代码: https : //github.com/prettyClouds/codility-lessons

If you use a 64-Bit version of Windows 10, you can use the experimental Linux Subsystem. 如果使用Windows 10的64位版本,则可以使用实验性Linux子系统。 Here's a decent summary.. How to install and use the Linux Bash-shell on Windows 10 这是一个不错的总结。. 如何在Windows 10上安装和使用Linux Bash-shell

Then you can access them with powershell/cmd (if you change the filenames) or work with them in 'bash-shell'. 然后,您可以使用powershell / cmd访问它们(如果更改文件名),或者在“ bash-shell”中使用它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM