git clone表示存储库不存在 [英] git clone is saying the repo does not exist
问题描述
我遵循了一些简单的步骤
I followed some simple steps found in this
- 派生回购
- 复制了https
address
- 运行
git clone address
- Forked a repo
- Copied the https
address
- ran
git clone address
我现在收到此错误
git clone https://github.com/hide_name/pr0-underbar.git repo_underbar
Cloning into 'repo_underbar'...
remote: Repository not found.
fatal: repository 'https://github.com/hide_name/pr0-underbar.git/' not found
我该怎么办才能解决问题或排除故障?
What can I do to fix or trouble shoot?
我检查了我的github页面,仓库肯定在那里.
I checked on my github page and the repository is definitely there.
Google搜索
https://www.google.com/#q = git + clone + says + repository + not + found
这不起作用:
推荐答案
相似的问题:
即使回购和分支存在,我也多次遇到此错误&我在正确的文件夹中.今天,我终于明白了.
I had this error many times, even when the repo and branch exist & I am in the right folder. Today, I could figure finally.
查看示例:
C:\my-repo1>git clone my-branch1
致命:存储库"my-branch1"不存在
fatal: repository 'my-branch1' does not exist
C:\my-repo1>git checkout my-branch1
切换到新的分支"my-branch1"
分支"my-branch1"已设置为从起源"跟踪远程分支"my-branch1".
Switched to a new branch 'my-branch1'
Branch 'my-branch1' set up to track remote branch 'my-branch1' from 'origin'.
如您所见,我应该使用 checkout 而不是 clone ,因为我已经将其克隆了&我正确地位于本地存储库目录中.
这会发生多次,因为克隆和结帐以相同的字母开头,并且您需要获取其他人的代码(获取其存储库的克隆,但它们位于相同的存储库中,但在不同的分支中),因此结帐就可以了.
显然,克隆分支(而不是repo)没有任何意义,但是我们有时还是会键入它.
As you can see, I should use checkout instead of clone, because I already cloned it & I am in local repo directory correctly.
This happens multiple times because clone and checkout start with the same letter, and you need to get other people code (getting clone of their repo, but they are on same repo, but in a different branch) so just checkout will work.
Obviously, clone a branch (instead of repo) does not mean anything, but we sometimes type it anyway.
这篇关于git clone表示存储库不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!