3

I am using Sitecore 10.0, running Sitecore CLI in a Windows PowerShell console. I have made sure I am in the root folder of my project. When I run the command dotnet sitecore ser push I get this error in the console:

Environment default is not configured to allow writing data. Use what-if, or set the environment to allow writes in the user.json file.

How do I get the push command to have permission to write?

1 Answer 1

3

This usually means that your .\sitecore\user.json file is not yet in your folder structure. I had this happen to me when I initially downloaded a project and tried to get things up and running from what is in source control. Typically, the user.json file is user-specific so is not in source control, therefore would be missing after your first download of a new project.

You can trigger the creation of the file by executing a fully-specified authentication with the allow-write parameter set to true. For example:

dotnet sitecore login -a https://my-id.sc.localhost -h https://my-cm.sc.localhost --allow-write true

NOTE: Make sure to alter the host names above to the ones that are applicable to your installation. The first host name is the IdentityServer instance, the second is the Content Management instance.

You can see more details in the official documentation: https://doc.sitecore.com/developers/100/developer-tools/en/log-in-to-a-sitecore-instance-with-sitecore-command-line-interface.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.