5 Cloning a Repository with VSCode
Learning Objectives
Understand what it means to clone or download a GitHub repository
Successfully copy a repository to your local machine using VSCode
Identify common errors and learn how to fix them
Step-by-Step Instructions
Open Visual Studio Code (VSCode).
On the Welcome page, click Clone Git Repository.
- If you don’t see this option, install the GitHub Extension from the VSCode marketplace.
Paste the repository URL:
Example:https://github.com/vmahan1998/GitHub_Basic_Skills.gitChoose a local folder where the repository should be saved.
Name the directory (typically the same as the repo name “GitHub_Basic_Skills”).
When prompted, click “Open” to begin working inside the cloned repository.
Video Tutorial
Troubleshooting
Authentication failed: If prompted for login credentials, use a personal access token (PAT) instead of a password. Generate one at https://github.com/settings/tokens.
Git not installed: Make sure Git is installed on your computer and that VSCode can detect it. You can download Git from https://git-scm.com.
Extension missing: Install the GitHub or Git integration extension from the Extensions Marketplace.