Vercel CLI error - “Git author must have access to the team”

,

Hey everyone,

I’m running into a frustrating issue when trying to deploy my project from the CLI.
Every time I run:

vercel --prod OR vercel

I get this error:

Error: Git author mybookshelf-dev@gmail.com must have access to the team Amir's projects on Vercel to create deployments.
  • My Vercel project name: mybookshelf

  • It’s connected to my Git repository (mybookshelf on GitHub)

  • I’m logged into Vercel CLI as:

    vercel whoami
    > mybookshelfdev
    
  • The project currently exists under the team workspace “Amir’s projects” (the user belong to the email i mentioned above)

Everything is connected correctly (I suppose), and I can deploy successfully through the Vercel Dashboard -
but any CLI deployment (vercel --prod) fails with the Git author access error above.

What I’ve tried

  • Removing .vercel/ and re-linking the project

  • Logging out and back in with the correct account

  • Disconnecting and reconnecting the GitHub repo

  • Re-creating the project under the same team

  • Deploying from a clean local folder

None of these have fixed the issue - the CLI still believes my Git author doesn’t have access to the team, even though I’m the one who owns both the team and the project.


What I’m trying to achieve

I simply want to be able to run:

vercel --prod

from my local CLI and have the deployment go through smoothly, just like it does from the dashboard.

Questions

  1. Why does this “Git author must have access” error appear when I’m the project owner?

  2. Is there a way to make the CLI deployment work without recreating the project from scratch?

  3. Should I adjust any settings or permissions within the team or project to fix this?

Any help or clarification would be hugely appreciated - I’ve already tried most of the obvious fixes and just want to get back to deploying smoothly via CLI.

Thanks so much :folded_hands:

Hey! Welcome to the Community :waving_hand:

This error usually pops up when your Git setup doesn’t match your Vercel team membership. Don’t worry, it’s an easy fix!

Check Your Git Configuration

First, check what email your local Git is using:

git config --global user.email

If it shows something like mybookshelf-dev@gmail.com but your Vercel account uses a different email, that’s likely the cause.

How to Fix It

Option 1: Update your Git email to match your Vercel account

git config --global user.email "your-vercel-account-email@example.com"

Option 2: Add your Git email to your Vercel team

  1. Go to your Vercel Dashboard
  2. Open your team settings (for example, “Amir’s projects”)
  3. Add mybookshelf-dev@gmail.com as a team member

Option 3: Double-check you’re using the right Vercel account

Make sure you’re logged into the Vercel CLI with the account that actually has access to the team:

vercel logout
vercel login

Then log in with the email that’s already part of your team.

Quick Fix

If you just need to deploy right now, you can override the Git author for this specific deployment:

git config user.email "your-vercel-email@example.com"
vercel --prod

This happens because Vercel checks whether the Git commit author has permission to deploy to the team, even if you’re logged in with the correct CLI account.

Helpful docs:

1 Like

Hey there and thanks for the quick response!

After running “git config --global user.email” and “git config --local user.email” I’ve noticed I had the wrong email configured - mybookshelf-dev@gmail.com

Now I’ve changed it with “git config --global user.email” and “git config --local user.email” to mybookshelf.dev@gmail.com which is the email registered in vercel and github for me in this project.

After that I’ve ran “vercel logout” & “vercel login” I ran “vercel” again for preview deployment but still got this error:

Error: Git author mybookshelf-dev@gmail.com must have access to the team Amir’s projects on Vercel to create deployments.

Why wasn’t the email updated?

Just from now update:

I ran these commands:

git commit --amend --reset-author --no-edit
git push --force origin main

vercel –prod

and now it works :slight_smile:

1 Like

Nice one! Thanks for coming back with a solution :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.