From Salesforce DX Project Configuration, the
sfdcLoginUrl parameter is only for auth commands within DX when connecting to your orgs.
The login URL that the auth commands use. If not specified, the default is login.salesforce.com. Override the default value if you
want users to authorize to a specific Salesforce instance. For
example, if you want to authorize into a sandbox org, set this
parameter to test.salesforce.com.
When deploying through the CLI or through clicks within VS Code, it uses the default org set for your project.
In VS Code, you can change this in several ways:
- Clicking on the plug icon within the lower left.
- Use the config command
sfdx config:set firstname.lastname@example.org
- Use the command palette with (
SFDX: Set a Default Org
If you want to change where you're deploying to within a specific command (and not change the default), there's the
-u parameter to pass your username for an org you've already authorized.
sfdx force:source:deploy -u email@example.com...
In terms of "orgs", it just represents salesforce instances you've authorized against (production, multiple sandboxes, scratch orgs, etc). When you authorize, you can provide an
alias which is considered best practice (see "The Power of Aliasing"). It makes it easier to remember than username.
sfdx auth:web:login -r https://test.salesforce.com -a MyDevSandbox
Instead of remembering your username for that specific sandbox - you can just remember the alias for the commands (ex. MyDevSandbox).
To see all your orgs you've authorized against, you can run the following:
It'll display your alias, username, and ORG Id.