Create SSH keys for the main repository
Repository settings # Pipelines > SSH keys
https://bitbucket.org/{USER}/{REPOSITORY}/admin/pipelines/ssh-keys
Add SSH public key in the target repository
Repository settings # General > Access keys
https://bitbucket.org/{USER}/{REPOSITORY}/admin/access-keys/
More at blog atlassian.com