This article explains how we can retrieve markdown content from a Bitbucket private repository managed by google or other authentication
Instructions
Go to Bitbucket and create an App password by navigating to your profile → Personal settings → App Password
Login to the confluence with administrator access and create a markdown profile by navigating settings → Markdown configuration → profiles and clicking Add profile.
In Profile section, Enter profile Name, choose Profile Type as URL and URL of the markdown file like https://api.bitbucket.org/2.0/repositories/$workspace/$repo/src/$commit/$filepath
Provide your bitbucket user name and password that is produced in Step-1.
Use Markdown from a URL macro in your confluence page and provide created Profile name to show markdown content.