Newer Version Available
Generate a Password for a Scratch Org
Use the CLI to create a password for your scratch org and set it for the specified
username. To change the password after you set it, you can’t unset it, rerun the
command.
-
Generate a password for your scratch org with this command:
1sfdx force:user:password:generate -u <my-scratch-org>You can run this command for scratch orgs only. The command outputs the generated password.
-
View the scratch org details:
force:org:display
1KEY VALUE 2─────────────── ───────────────────────────────────────────────── 3Access Token 008jF!AQoEr5qa2Fp1_.l62DdsQE.ktgDflN_.fVfBc_xQzO3 4Alias TempUnmanaged 5Client Id SalesforceDevelopmentExperience 6Created Date 2017-04-26 7Dev Hub Id 0J746000000PBp9 8Edition Developer Edition 9Expiration Date 2017-05-04 10Id 00D3D0000008bjF 11Instance Url https://connect-ruby-461-dev-ed.cs70.my.salesforce.com 12Password 4739223f 13Scratch Org true 14Username scratchorg1493225075521@acme.com -
Log in to the scratch org:
- From the force:org:display output, copy the value of Instance URL.
- Log in:
-
In the login screen, click Use Custom Domain.
If you don’t see this option, select Log In with a Different Username.
- In the Custom Domain field, paste the instance URL without the https://.
- Click Continue, then enter the username and password for the scratch org listed in the output of the org:display command.