Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Git Submodules needs option to pull latest commits

Ganga S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2019

 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.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events