function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Trevor RoyTrevor Roy 

"Get Ready to Create an App" tailhead

Working through the "Get Ready to Create an App" trailhead module and I'm stuck on the step to create a new scratch org.
I keep getting this error:
          ERROR running force:org:create:  You do not have access to the [ScratchOrgInfo] object.

I'm using the copy function of the text snippet so I know it's not a syntax problem.
                sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch

Anyone run into this?

Best Answer chosen by Trevor Roy
Trevor RoyTrevor Roy

It appears this was caused by having DevHub set to an improper org, this was resolved by doing the following:

1. Sign up for a new org based on the first step of the trailhead module

2. Setting up that org as the DevHub

3. using sfdx force:org:delete to remove the other orgs I had listed there.

 

Once that was cleared up I was able to proceed to create a new scratch org.

All Answers

Trevor RoyTrevor Roy

It appears this was caused by having DevHub set to an improper org, this was resolved by doing the following:

1. Sign up for a new org based on the first step of the trailhead module

2. Setting up that org as the DevHub

3. using sfdx force:org:delete to remove the other orgs I had listed there.

 

Once that was cleared up I was able to proceed to create a new scratch org.

This was selected as the best answer
dimasdimas
What was inproper about the org? I have 2 trial orgs that are both brand new. The second one I created when I tried your solution but it didn't resolve the issue. I only have one org right now that is set to default. I tried starting from scratch completely and on a different machine but I got the same error message. Any help is appreciated! Thanks