How to connect GitHub repository on Vercel
Sign up on Vercel with GitHub, import your repository from the dashboard, configure build settings if needed, and deploy. Automatic deployments trigger on git pushes. Use CLI as alternative if dashboard issues arise.
Prerequisites
- GitHub account with owner/write permissions on the target repository
- Vercel account (free tier works)
- GitHub app installed and configured for Vercel access to repositories
- Optional: Vercel CLI and Node.js 18+ for troubleshooting
Step-by-Step Instructions
Sign up or log in to Vercel with GitHub
vercel.com, click Sign Up or Log In, and select Continue with GitHub to authorize access. This grants permissions like Contents (read/write), Deployments, Pull Requests, and Web Hooks.Start a New Project in Vercel Dashboard
Authorize GitHub Access if Prompted
Select and Import Your Repository
Configure Project Settings
next build), Output Directory (e.g., .next), Install Command (e.g., npm install), Root Directory (default /). Click Deploy.Set Up Environment Variables (Optional)
API_KEY with values, select scopes (Preview, Production, or All). Save and redeploy via git push.Verify Git Connection in Settings
main), and webhook status. Change repo or Disconnect if needed.Test Automatic Deployments
CLI Alternative for Setup
npm i -g vercel
cd /path/to/your/repo
vercel login
vercel git connect
vercel --prod Use for troubleshooting dashboard issues; prompts match dashboard defaults.Common Issues & Troubleshooting
Silent failure or no repo import after connecting dialog
Reconnect GitHub in Vercel Settings > Git > Disconnect/Reconnect. Clear browser cache/cookies, use incognito, or verify GitHub Applications > Vercel permissions.
Infinite install loop or 404 on Vercel git pages
Check GitHub status, reconnect integrations, clear browser data, or use CLI with <code>vercel link</code>.
DELETED ACCOUNT or permission errors
Ensure owner/write access on repo. For orgs, confirm Member role with repo access. Reinstall Vercel GitHub app.
Repository not visible in import list
Must be repo Owner for personal accounts. Verify GitHub app grants <strong>All repositories</strong> or specific access.
Deployment fails after connection
Check team permissions, org settings for Vercel integration, and use CLI to trigger new deployment.