We use PowerShell scripts that run unattended overnight to perform git operations then build and deploy to test systems. Previously we used the "app password" approach and this worked fine.
Following the warning that app passwords would be discontinued (which we only noticed very late since these are unattended operations) I have created an API Key with suitable scopes and followed the instructions on here for existing repos, using
git remote set-url origin https:[username]:[API Key]@bitybucket.org... etc.
This seemed okay, but when I run the PowerShell script, which has simple commands such as
git checkout $branch
git pull
it still shows the interactive pop-up to log in (with browser or password options). When I enter the API key as the password/key this does work, but it's not going to work unattended.
Are there further steps I need to take to allow this kind of unattended operation using the API key?