question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switch between multiple accounts when using CLI

See original GitHub issue

I would like to switch between multiple Sanity.io accounts.

Something like sanity switch ACCOUNT would be useful. We can store multiple login tokens and tag/name them.

It’s not very practical to log in every time I need to work on different project.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
milosmaliccommented, Mar 5, 2020

@vicbergquist Is there a way to change account at all? Like manually deleting it in some config and running init again to authenticate?

Found sanity login command, forget about the question 😃

0reactions
codingChewiecommented, Sep 27, 2022

Ran across this while learning about Sanity and had an issue when trying to build a project in the CLI and was getting an error regarding not being added when running the command:

sanity start

and after clicking the URL: http://localhost:3333

In the terminal, after the global installation of:

npm install -g @sanity/cli

If you’ve performed the init command:

sanity init

and you want to use a different account, in the terminal you can logout:

sanity logout 

then log into your other account.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to: Use multiple AWS accounts with the AWS-CLI
To switch between different AWS accounts, set the AWS_profile environment variable at the command line via export AWS_PROFILE=profile_name .
Read more >
Manage Multiple Accounts with the AWS CLI | bobbyhadz
A complete step-by-step guide on how to configure multiple accounts for the AWS CLI, showing both the files and environment variables approach.
Read more >
How to use multiple AWS accounts from the command line?
You can work with two accounts by creating two profiles on the aws command line. It will prompt you for your AWS Access...
Read more >
Tutorial: How to handle multiple accounts within the Netlify CLI
To be able to run netlify dev on sites linked to each account, you can connect the CLI to both, and switch between...
Read more >
How to manage multiple AWS accounts for the AWS CLI on ...
How to manage multiple AWS accounts for the AWS CLI on the same computer Mar 6 2021 · AWS CLI tool · Using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found