Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checkout Submodules in another Project in Azure DevOps Repository

I'm trying to checkout a submodule from another project in azure devops.

steps:

- checkout: self
  submodules: true
  persistCredentials: true
  clean: true

Checking out another repository in the same project works.

GOAL

Add as submodule REPOSITORY A in REPOSITORY B.

Projects

However i get the error:

Cloning into 'E:/build/Agent5/_work/16/s/.azuredevops'...
fatal: could not read Username for 'https://dev.azure.com': terminal prompts disabled
fatal: clone of 'https://dev.azure.com/ORGANIZATION/PROJECTA/_git/REPOSITORYA' into submodule path 'E:/build/Agent5/_work/16/s/.azuredevops' failed

How can i achieve this using YAML in Azure DevOps Repositories?

like image 653
BrunoMartinsPro Avatar asked Dec 05 '22 09:12

BrunoMartinsPro


1 Answers

There was on option "Limit job authorization" that was checked on by default, in the Project Settings (bottom of the the left menu).

Turning it off solved the issue.

Project setting pane, option that solved issue

And FYI I just had this to be added in the yaml, under steps::

- checkout: self
  submodules: true
like image 64
Pac0 Avatar answered Dec 07 '22 23:12

Pac0