0

I am struggling with this since morning. Someone from my team has created a scratch org and has added me as a Sys Admin. How do I connect to it via VsCode? I tried sfdx force:config:set defaultusername= *my username" However, I am getting "No org configuration found for name" I tried authenticating the dev hub, a number of times.

Please help.

4

You need to authenticate to the scratch org itself, rather than the Dev Hub, but the command is the same:

sfdx force:auth:web:login -a <desired alias> --instanceurl <instance url>

See the command reference. When SFDX opens the browser for you, just log in with the created credentials, and the org will be added to your SFDX keychain and org list. If you want the org to be your default, add -s.

3
  • Hey, so i tried with this, and I get Unexpected arguments: --instance-url. Tried the actual instance url of the scratch org and test.salesforce.com both. – Kaustubh Labhe Jul 22 '19 at 11:37
  • Did you include https:// in the instance-url parameter, as shown in the example at the provided link? – Thomas Taylor Jul 22 '19 at 11:43
  • 1
    My bad, there was a typo. the command had instance-url, instead of instanceUrl. – Kaustubh Labhe Jul 22 '19 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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