简体   繁体   中英

Error in git clone of a private repository

I'm trying to clone a private repository. I have tried with 2 ways

  1. Using Android Studio

Result在此处输入图片说明

  1. Using CMD

Result

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

Screenshot to verify the repo

在此处输入图片说明

How do I access my private repository?

There can be multiple causes for this error. Try following in the order mentioned

  1. Include your username in the repo url
git clone https://username@github.com/thoughtcastapp/git.android.ThoughtCast.git/
  1. Identify remote git repository to your terminal.
git remote set-url origin https://github.com/thoughtcastapp/git.android.ThoughtCast.git/
  1. Uninstall the git credentials manager and reinstall (for cmd, run as administrator)
$ sudo git credential-manager uninstall
$ sudo git credential-manager install
  1. If repo has been created by another user, check if you have read-write access.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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