What is Git Private Repo?
Public repositories are accessible to everyone, but private repositories are accessible to account owners. The owner can provide access to those who want a private repository. Private repositories are more secure.
Read: Git Repositories
How To Clone Private Git Repo With Dockerfile?
Cloning the private git repository in the Dockerfile is often used in situations where you want to build a Docker image of the source code or any assets from the private git repository. Cloning git will reduce the size of the docker image by separating the build environment from the runtime environment using the stage-stage build