
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis error typically occurs when there's a mismatch between the authentication credentials the CLI is using and the project you're trying to deploy to. Here are the most common causes and solutions:
The error "Project user does not have any ACL for this project" usually means you're authenticated as a user (or with a token) that doesn't have permissions for the project you're deploying to.
1. Re-authenticate with the CLI
First, try logging out and back in:
sanity logout
sanity loginThen try running npm run graphql-deploy again.
2. Check for Environment Variables
If you have a SANITY_AUTH_TOKEN environment variable set, it will override your CLI login. This is a common issue when following tutorials that use tokens for CI/CD. Check if you have this set:
# On Mac/Linux
echo $SANITY_AUTH_TOKEN
# On Windows
echo %SANITY_AUTH_TOKEN%If it's set and you don't need it, unset it:
# Mac/Linux
unset SANITY_AUTH_TOKEN
# Windows
set SANITY_AUTH_TOKEN=3. Verify Your Project ID
Make sure you're in the correct project directory and that your sanity.json or sanity.config.js file has the correct projectId. The error mentions project user "pGJU8tBOF" - verify this matches your actual project.
4. Check Project Permissions
Log into sanity.io/manage, select your project, and verify:
5. Create a New Auth Token (if needed)
If you need to use a token, create a fresh one with proper permissions:
The Gatsby blog tutorial may have you clone a starter that references a different project ID, or you might be using example credentials. Make sure you've initialized the project with your own account using sanity init before trying to deploy the GraphQL endpoint.
After trying these steps, the sanity graphql deploy command should work properly. Remember that you'll need to run sanity graphql deploy whenever you update your schema to reflect those changes in your GraphQL API.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store