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
Which makes sense - that URL isn't of a repository.
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.
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:
- Get a list of URLS containing all repos for an org/user.
- Clone each of theme using
git clone
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…