When you create a scratch org in Gearset, there's no need to remember a username and password - Gearset will securely store a token to allow you to deploy to and from the org.
However, sometimes it's useful to have a username and password to authenticate other tools to the scratch org, such as Workbench or the Salesforce Extensions for Visual Studio Code.
Setting a username and password on a scratch org
Go to the Salesforce orgs page in Gearset and locate your scratch org (at the bottom of the page, or using the
Scratch orgsfilter on the left-hand side). Click on the arrow button to see the username for your scratch org:
Click on the
Log into orglink to log into the scratch org.
In the org, in
Setup, in the
Quick Findbox, type
usersand click on
Find the user called
User, Userin the list and select it. It should have the same username as was displayed within Gearset
At the bottom of the list, click
Reset Password(s). You will receive an email with a link to set a new password for your username.
Using the scratch org with the CLI
Once you've set a password on your scratch org, you can connect to it using the CLI.
To do so, you'll need the My Domain login URL for your scratch org. When logged into the scratch org, your URL bar will look something like:
To construct the My Domain URL, take the URL from your browser and replace the
.lightning.force.com part with
.my.salesforce.com. Your My Domain URL should look like:
You can use this to log into the org with the
sfdx force:auth:web:login -r https://xxx-yyy-zzz-dev-ed.my.salesforce.com -a someAlias