You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following message trying to run the backup demonstration in the README: Error: Unauthorized - Session not found. You may need to login again with sanity login.
I have set SANITY_AUTH_TOKEN in my repository secrets. I have tried using several Sanity API tokens: one with the deploy-studio designation, one developer token and one viewer token. However, they all throw the same error.
- A temporary issue, please try to run your command again.
- You have specified an invalid token with the SANITY_AUTH_TOKEN env variable.
- The session timed out. Try to log out and log in again with the sanity logout and sanity login CLI commands.
- There was an issue with your logged in user. Try to logout and login again.
I'm confused here because my understanding of deploy tokens is that sanity login shouldn't be required. So, reasons 3 & 4 don't apply when I get that error using a deploy token.
To Reproduce
I copied the code from the "backup" demo in the readme, with a small modification to run the workflow manually instead of on a cron job. Here is the full code of my workflow:
name: "Backup prod CMS"
on:
workflow_dispatch:
jobs:
backup-dataset:
runs-on: ubuntu-latest
name: Backup dataset
steps:
- uses: actions/checkout@v2
- run: yarn install
- name: Export dataset
uses: sanity-io/[email protected]
env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
with:
args: dataset export production backups/backup.tar.gz
- name: Upload backup.tar.gz
uses: actions/upload-artifact@v2
with:
name: backup-tarball
path: backups/backup.tar.gz
# Fails the workflow if no files are found; defaults to 'warn'
if-no-files-found: error
The text was updated successfully, but these errors were encountered:
I faced the same issue when trying to deploy the studio.
For now the simplest solution I found was to bypass sanity-io/github-action-sanity and use the sanity cli directly :
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I get the following message trying to run the backup demonstration in the README:
Error: Unauthorized - Session not found. You may need to login again with sanity login.
I have set
SANITY_AUTH_TOKEN
in my repository secrets. I have tried using several Sanity API tokens: one with thedeploy-studio
designation, onedeveloper
token and oneviewer
token. However, they all throw the same error.According to the docs this message could mean:
I'm confused here because my understanding of deploy tokens is that
sanity login
shouldn't be required. So, reasons 3 & 4 don't apply when I get that error using a deploy token.To Reproduce
I copied the code from the "backup" demo in the readme, with a small modification to run the workflow manually instead of on a cron job. Here is the full code of my workflow:
The text was updated successfully, but these errors were encountered: