Bitbucket
How to sync secrets from Infisical to Bitbucket
Infisical lets you sync secrets to Bitbucket at the repository-level and deployment environment-level.
Prerequisites:
- Set up and add envars to Infisical Cloud
Push secrets to Bitbucket from Infisical
Push secrets to Bitbucket from Infisical
Authorize Infisical for Bitbucket
Navigate to your project’s integrations tab in Infisical.
Press on the Bitbucket tile and grant Infisical access to your Bitbucket account.
Configure integration
Select which workspace, repository, and optionally, deployment environment, you’d like to sync your secrets to.
Once created, your integration will begin syncing secrets to the configured repository or deployment environment.
Pull secrets in Bitbucket pipelines from Infisical
Pull secrets in Bitbucket pipelines from Infisical
Configure Infisical Access
Configure a Machine Identity for your project and give it permissions to read secrets from your desired Infisical projects and environments.
Initialize Bitbucket variables
Create Bitbucket variables (can be either workspace, repository, or deployment-level) to store Machine Identity Client ID and Client Secret.
Integrate Infisical secrets into the pipeline
Edit your Bitbucket pipeline YAML file to include the use of the Infisical CLI to fetch and inject secrets into any script or command within the pipeline.
Example
Set the values of projectId
and env
flags in the infisical run
command to your intended source path. For more options, refer to the CLI command reference here.