During a CI build script i want the submodule to be updated to the latest as it is building.Iam aware that the build process in VSTS takes care of checking out the submodules,but they are checked out at the hash reference of whatever is there in the repository.I would like the process to update to the latest code.
I added the below command line script to get the latest of the submodule.
git -c http.https://bitbucket.org.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" submodule update --init --force --recursive --remote --merge
it seems to be this particular command causing the problem.
Tried the below command to update the submodule remote Url during the build through command line task.
git remote set-url origin https://$Username:@Password@bitbucket.org/rsenterpriseteam/pat-shared.git
I also checked out check Allow scripts to access OAuth Options in build definition and pass $(System.AccessToken) variable value in arguments box.
The repositories are accessed through https and not through ssh.
None of the options are working.How can I get the authorization done on my command line task??
Any help will be appreciated.