Skip to content

This repository is used for youtube video. All the commands used in my video are available here in readme.

License

Notifications You must be signed in to change notification settings

codewithmuh/clone-private-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

How to Clone a GitHub Private Repository on a Server | Step-by-Step Guide

1. Generate a New SSH Key

ssh-keygen -t ed25519 -C "your_email@example.com"

2. Add Your SSH Key to the SSH Agent

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

3. Add the SSH Key to Your GitHub Account

copy the SSH public key to your clipboard:

cat ~/.ssh/id_ed25519.pub

Go to GitHub Settings > SSH and GPG keys, click "New SSH key," and paste your key.

4. Test the SSH Connection

ssh -T git@github.com

5. Update Repository Remote URL

Go to the folder of your repo:

git remote set-url origin git@github.com:GITHUB_USERNAME/REPO_NAME.git

6. Pull the Repository

git pull origin main

About

This repository is used for youtube video. All the commands used in my video are available here in readme.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published