Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Online scheduled build can't find my branch

I have created a Build Definition in Visual Studio Online which points to an "External Git" repository hosted at BitBucket. The details are set up under the "Repository" tab as follows: Repo Setup

When I manually queue a build, using the "Queue build..." button, everything works as expected. My log is as follows:

2015-07-22T07:07:50.0285647Z Syncing repository: NxGN.OpenCast (Git)
2015-07-22T07:07:53.6355527Z Checking out origin/dev to C:\a\6268f160\NxGN.OpenCast
2015-07-22T07:07:53.9928992Z Checked out branch dev for repository NxGN.OpenCast at commit 9a658c94a1045df5656a654c780f5b7d1c2809f4

My problem is that for a scheduled build, configured like Scheduled Build it fails with the following log:

2015-07-22T07:20:24.0976453Z Syncing repository: NxGN.OpenCast (Git)
2015-07-22T07:20:26.6424255Z Checking out +origin/dev to C:\a\6268f160\NxGN.OpenCast
2015-07-22T07:20:26.6724252Z ##[error]No valid git object identified by '+origin/dev' exists in the repository.

I have tried specifying the branch as dev, origin/dev, refs/heads/dev, all of which place a + at the beginning of the branch name in the produced log.

What am I doing wrong?

like image 545
Corpsekicker Avatar asked Jul 22 '15 07:07

Corpsekicker


1 Answers

Maybe that + is part of a refspec.

In that case, try as value (beside the "Include" field):

dev:refs/remotes/origin/dev
like image 90
VonC Avatar answered Nov 03 '22 00:11

VonC