In this article, we will discuss using GitHub Copilot for Free in VS Code. This will be a step-by-step guide for you.
Topics Covered
Getting Started with GitHub Copilot in VS Code for Free
GitHub Copilot, powered by OpenAI Codex, is an AI-powered code completion tool designed to help developers write code faster and more efficiently. It integrates seamlessly with Visual Studio Code (VS Code), offering context-aware suggestions as you write.
If you’re new to GitHub Copilot and want to get started without spending a dime, this guide is for you.
What is GitHub Copilot?
GitHub Copilot acts as an AI-powered pair programmer, assisting you by providing code suggestions, completing snippets, and generating boilerplate code based on comments and context.
It supports multiple programming languages like Python, JavaScript, Java, C#, and more, making it a versatile tool for developers.

Prerequisites
Before diving into the setup, ensure you have the following:
- GitHub Account: Create a GitHub account if you don’t have one.
- VS Code: Download and install Visual Studio Code.
- Free GitHub Copilot Access: If you’re a student or contributor to open-source projects, you may qualify for free access to GitHub Copilot.
Step 1: Check Eligibility for Free Access
- GitHub Education: Students can apply for the GitHub Student Developer Pack, which includes free access to GitHub Copilot.
- Open Source Contributors: If you’re an active contributor to public repositories on GitHub, you might qualify for free Copilot access. Check your GitHub Copilot subscription page for eligibility.
GitHub account now includes free use of GitHub Copilot in VS Code and on GitHub, powered by your choice of AI models from OpenAI and Anthropic. This is now part of your personal GitHub account, and accessible via VS Code and on GitHub.
You get:
- 2,000 code suggestions a month: Get context-aware suggestions tailored to your VS Code workspace and GitHub projects.
- 50 Copilot Chat messages a month: Use Copilot Chat in VS Code and on GitHub to ask questions and refactor, debug, document, and explain code.
- Choose your AI model: You can select between Anthropic’s Claude 3.5 Sonnet or OpenAI’s GPT 4o.
- Render edits across multiple files: Use Copilot Edits to make changes to multiple files you’re working with.
- Access the Copilot Extensions ecosystem: Use third-party agents to conduct web searches via Perplexity, access information from Stack Overflow, and more.
Step 2: Install GitHub Copilot in VS Code
- Open VS Code.
- Navigate to the Extensions Marketplace by clicking on the Extensions icon on the sidebar or pressing
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(Mac). - Search for “GitHub Copilot” in the search bar.
- Click Install next to the “GitHub Copilot” extension.
Step 3: Sign In with GitHub
- After installation, VS Code will prompt you to sign in to GitHub.
- Click Sign In and follow the on-screen instructions to authorize VS Code to access your GitHub account.
Step 4: Enable GitHub Copilot
- Once signed in, GitHub Copilot is ready to use. However, ensure it’s enabled:
- Go to File > Preferences > Settings (or
Ctrl+,on Windows/Linux,Cmd+,on Mac). - Search for “Copilot” in the settings search bar.
- Enable Copilot for suggestions and inline code completions.
- Go to File > Preferences > Settings (or
Step 5: Start Coding with GitHub Copilot
- Open or create a file in a programming language supported by Copilot (e.g., Python, JavaScript).
- Begin typing a comment or code snippet. For example:
# Write a function to calculate factorial - Watch as Copilot suggests the complete function. You can accept suggestions by pressing
Tabor cycle through multiple suggestions usingCtrl+Space.
Tips for Using GitHub Copilot Effectively
- Write Descriptive Comments: The more context you provide, the better suggestions Copilot will generate.
- Experiment with Multiple Prompts: If the initial suggestion isn’t ideal, tweak your comments or code and see alternative completions.
- Keyboard Shortcuts: Learn Copilot shortcuts to accept (
Tab), dismiss (Esc), or view more suggestions (Alt+[andAlt+]).
Common Troubleshooting
- Not Seeing Suggestions:
- Ensure your internet connection is active.
- Verify that the GitHub Copilot extension is enabled in VS Code.
- Access Issues:
- Check your subscription status on the GitHub Copilot settings page.
Next Steps
Once you’re comfortable with GitHub Copilot, explore its advanced features:
- Use Copilot for multi-file projects.
- Test its capabilities in different programming languages.
- Pair it with other VS Code extensions for enhanced productivity.
Conclusion
GitHub Copilot is a powerful tool that enhances your coding experience by saving time and reducing repetitive tasks.
By leveraging free access options, students and open-source contributors can unlock the full potential of this AI-powered assistant.
With this guide, you’re all set to get started and take your coding journey to the next level.
This is how you can use GitHub Copilot for Free in VS Code.
Enjoy coding smarter with GitHub Copilot!

