私有存储库的git clone错误

时间:2018-09-06 18:35:56

标签: git github cmd git-clone

我正在尝试克隆一个私有存储库。我尝试了2种方法

  1. 使用Android Studio

结果 enter image description here

  1. 使用CMD

结果

C:\thoughtcast>git clone https://github.com/thoughtcastapp/git.android.ThoughtCast.git
Cloning into 'git.android.ThoughtCast'...
remote: Repository not found.
fatal: repository 'https://github.com/thoughtcastapp/git.android.ThoughtCast.git/' not found

截屏以验证存储库

enter image description here

  

如何访问我的私有存储库?

1 个答案:

答案 0 :(得分:1)

此错误可能有多种原因。尝试按照提到的顺序进行操作

  
      
  1. 在回购网址中包含您的用户名
  2.   
git clone https://username@github.com/thoughtcastapp/git.android.ThoughtCast.git/
  
      
  1. 标识到您终端的远程git存储库。
  2.   
git remote set-url origin https://github.com/thoughtcastapp/git.android.ThoughtCast.git/
  
      
  1. 卸载git凭据管理器并重新安装(对于cmd,以管理员身份运行)
  2.   
$ sudo git credential-manager uninstall
$ sudo git credential-manager install
  
      
  1. 如果回购是由其他用户创建的,请检查您是否具有读写访问权限。
  2.