When creating an Amazon Sagemaker git repository to use with Jupyter notebook instances, you need to create a secret which has a username and password field. For Github, they recommend using a personal access token but Bitbucket does not have a personal access token and instead has either a repository access token or an app password. The app password in Bitbucket works more like the personal access token in Github. So you click on the gear icon (settings) in the Bitbucket repo that you want to create an app password for and then select personal Bitbucket settings
, then in left side bar
click on app passwords and create an app password with the permissions you need. Copy the password value, then use your Bitbucket username and that app password value for the Sagemaker username and password in the create secret part of adding a repository in Sagemaker. This will create the secret in Amazon Secrets manager. Then when you want to create a notebook instance from a python script running from the cloned repo, it will authenticate using that username and password.