I have two flutter projects. A package and an executable. Each of them is in a different git repository on different projects (within the same organization) on Azure DevOps.
I reference the package from the executable in the pubspec.yaml file like this:
my_package:
git:
url: https://my_organization@dev.azure.com/my_organization/MyProject/_git/MyRepo
path: path_to_my_package
ref: v0.0.1
That works fine on my local machine. When I run flutter pub get
it fetches my package and I can work with it.
When I push this now to git, my Azure pipeline stops with the following error:
Resolving dependencies...
Git error. Command: `git clone --mirror https://my_organization@dev.azure.com/my_organization/MyProject/_git/MyRepo C:\Users\VssAdministrator\AppData\Local\Pub\Cache\git\cache\my_package`
stdout:
stderr: Cloning into bare repository 'C:\Users\VssAdministrator\AppData\Local\Pub\Cache\git\cache\my_package'...
fatal: Cannot prompt because user interactivity has been disabled.
fatal: Cannot prompt because user interactivity has been disabled.
fatal: could not read Password for 'https://my_organization@dev.azure.com/my_organization/MyProject/_git/MyRepo': terminal prompts disabled
exit code: 128
I don't want to provide the credentials or PAT directly in the pubspec.yaml file.
I granted read access to the Build Service user of the executable project to the project of the package but that didn't help.
I also switched off the "Limit job authorization scope to current project for non-release pipelines" setting.
Still fails. Any ideas?