Slicemachine cant push ater owner transfert

When i started my nuxt project i created a nuxt repository in my own prismic dashboard and i have created content-type with slicemachine in local. All works perfectly.

But i have to transfert ownership to an other account, then I couldn't anymore push my modifications with slicemachine. Repository name and API endpoint keep same name and values so i keep slicemachine.config.json as same.

In localhost slicemachine, when i want to push in "review pages", all changes aren't displayed and i have message " It seems like you don't have access to this repository. Check that the repository name is correct, then contact your repository administrator." I can acces to new repository and i'm logged to it.

How can i fix it ? Maybe can there is a specific command ?

Here my slicemachine config :

{
  "apiEndpoint": "https://societe-astronomique-montpellier.cdn.prismic.io/api/v2",
  "repositoryName": "societe-astronomique-montpellier",
  "adapter": "@slicemachine/adapter-nuxt",
  "libraries": ["./slices"],
  "localSliceSimulatorURL": "http://localhost:3000/slice-simulator"
}

slicemachine version: 2.7.1

Hi @balistik.fonfon ,

You need to ensure that the account and email you are using to log into Prismic locally (in your development environment) is the same as the one associated with the repository's ownership or has the correct permissions in the Prismic dashboard. Here's why this matters:

1. Account Permissions:

When you transfer the ownership of a repository to a different account, the permissions associated with your old account might change. You may no longer have the same level of access (e.g., “Owner” or “Editor”) that you had previously. Without proper access rights, you won't be able to push updates or changes to the repository, even though you can still view the repository or pull content from it.

Solution:

  • Make sure that your local development environment is logged in with an account that has the appropriate access rights to the repository. This account should either be the owner of the repository or have at least "Editor" privileges.

2. Login Email Consistency:

The email address you use to log into Prismic locally should match the email that has access to the repository. If you are logged into a different Prismic account locally (e.g., a personal account instead of the new repository owner’s account), SliceMachine won't allow you to push changes, because your local account won’t have the necessary permissions for that repository.

Solution:

  • If you transferred the repository to a new account, ensure that you log out of Prismic in your local environment and log back in using the new account credentials (the account that now owns or has access to the repository). You can log out and log back in by using the following commands:
    prismic logout
    prismic login
    

3. Verify Repository Ownership:

After a transfer, double-check that your new account is correctly set as the owner of the repository, or if it was transferred to another person, ensure that they have granted you the necessary permissions to make changes. If the repository owner has not granted you the appropriate access level, you will need to request access from them through the Prismic dashboard.

4. Refresh Authentication Tokens:

In some cases, after a transfer or permission change, the authentication token used by SliceMachine in your local environment may become invalid or outdated. Logging out and back in should refresh this token, ensuring your local setup has the correct permissions to interact with the Prismic repository.

Solution:

  • Run the prismic logout and prismic login commands to re-authenticate your local environment with the correct credentials.

By making sure that your Prismic login information matches the repository owner or an authorized account, and that you're using the correct email locally, you'll regain the ability to push your changes to the repository.

Thanks.

2 Likes

It works with logout and login commands , thank you.
I've read prismic-cli Technical Reference - Documentation - Prismic documentation.

1 Like