什么是完整的github回购网址? [英] What is the url for a full github repo?
问题描述
我试图将我的整个github repo克隆到新机器上。在网站上,网址如下所示:
I am trying to clone my entire github repo onto a new machine. On the website, the url looks something like this:
然而,当我这样做时:
However, when I do this:
git clone https://github.com/MyName C:/Users/MyName/Documents/GitHub/
I get
>Cloning into GitHub 'C:/Users/MyName/Documents/GitHub/'
>fatal: repository 'https://github.com/MyName' not found
推荐答案
https://github.com/MyName
将是一个帐户的URL,而不是回购。例如,jQuery(公司)在 https://github.com/jquery
上有一个帐户。如果我尝试从该URL进行克隆,则会出现克隆错误:
https://github.com/MyName
would be the URL for an account, not a repo. For instance, jQuery (the company) has an account at https://github.com/jquery
. If I try to clone from that URL, I get a clone error:
git clone https://github.com/jquery
>>> Cloning into 'jquery'...
>>> fatal: repository 'https://github.com/jquery' not found
有道理 - URL不是存储库。
Which makes sense - that URL isn't of a repository.
同时,如果我实际克隆项目, https://github.com/jquery/jquery
,它的工作原理:
Meanwhile, if I actually clone the project, https://github.com/jquery/jquery
, it works:
git clone https://github.com/jquery/jquery.git
>>> Cloning into 'jquery'...
>>> remote: Counting objects: 36035, done.
>>> remote: Compressing objects: 100% (91/91), done.
>>> remote: Total 36035 (delta 60), reused 0 (delta 0), pack-reused 35944
>>> Receiving objects: 100% (36035/36035), 21.72 MiB | 2.77 MiB/s, done.
>>> Resolving deltas: 100% (25434/25434), done.
>>> Checking connectivity... done.
如果您想要克隆用户名下的所有回购站,则无法使用本地方式那。但是,克隆全部或 github-clone 似乎符合法案的要求,因为它会为你做到这一点。
If you want to clone all the repos under a username, there isn't a native way to do that. However, clone-all or github-clone seem to fit the bill as tools that'll do this for you.
你需要做的(手工或工具):
The general procedure that you would need to do (by hand or with a tool) would be:
- 获取包含组织所有回购的URLS列表/用户。
- 使用
git clone
来克隆每个主题。
- Get a list of URLS containing all repos for an org/user.
- Clone each of theme using
git clone
.
这篇关于什么是完整的github回购网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!