- Create empty private repo
- Bare clone a public repo, and mirror push it to the private repo.
git clone --bare https://github.com/exampleuser/public_repo.git
cd public_repo.git
git push --mirror https://github.com/yourname/private_repo.git
- Register remote repository with public repositoryPermalink
git clone https://github.com/yourname/private_repo.git