Authenticating to Environments

Environments in sfops are authenticated using the credentials stored in Github. This section describes the various mechanisms used for authenticating environments

Authenticating to Production Environment

If your dev hub and production is on the same org, you do not have to create any additional secrets in the Github Environment 'PROD'. If its different, you need to create a new environment secret titled 'SFDX_AUTH_URL' and add the equivalent value.

Authenticating to Other Environments

Authenticating to any other environments backed by a sandbox, depends on how the sandbox is being created 1. Sandboxes created by same production user configured in GitHub

Sandboxes created by the same production user can be authenticated by using the sandbox name, all that is required is the use of setting up the SBX_NAME variable in environment as shown below\

Please note, when a sandbox is refreshed from the UI, irrespective of whether the action was done by the same user configured in Github, sfops will not be able to authenticate to this environment, and you will need to provide SB_SFDX_AUTH_URL as mentioned in #2.

  1. Sandboxes created by any other users in production To authenticate a sandbox that was not created by the configured user in Github, one needs to provide a environment secret SB_SFDX_AUTH_URL which can be obtained by using the instructions here.

Last updated