Skip to content

How to Create a Private Repository

โ† Back to Git


๐Ÿ”’ Create a Private Repository

A private repository is only visible to you and people you explicitly invite.

1. Start New Repository

Click on the New button on your repository list or dashboard.

New Repository

2. Configure Settings

  1. Enter a Repository name.
  2. Select Private (this creates a private repo).
  3. Check Add a README file (recommended to initialize the repo).
  4. Click Create repository.

Private Settings

The repository will be marked with a Private badge next to its name.

Private Badge


๐Ÿ”‘ Authentication

Since the repository is private, you need to authenticate to clone or push to it. There are two common methods:

  1. Personal Access Token (PAT) (Recommended for HTTPS)
  2. SSH Keys

Remote vs Local

Understanding the connection:

Remote vs Local


๐ŸŽฅ Watch on YouTube:

Git Private Repo


๐Ÿง  Quick Quiz โ€” Private Repos

#

Who can view a Private repository on GitHub?


๐Ÿ“ Want More Practice?

๐Ÿ‘‰ Start Git Intermediate Quiz (20 Questions)


๐Ÿ“ฌ DevopsPilot Weekly โ€” Learn DevOps, Cloud & Gen AI the simple way.
๐Ÿ‘‰ Subscribe here