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:

  • Automatically open a pull request on github by command line
  • Cannot run Xcode (7.3) UI tests in Jenkins
  • Changing Excel spreadsheet cells through the usage of Jenkins
  • trigger other configuration and send current build status with Jenkins
  • Jenkins: Get build numbers range on a particular day
  • jenkins Slave API setLabelString adds to User list
  • 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?

  • Automating svn update
  • jenkins change label as requested
  • vNext build on TFS 2015 hangs on MSBuild step and produces no log files
  • Handling multiple branches in continuous integration
  • How do I clone a job in jenkins?
  • Is it safe to run your site within a Git repository on your production server?
  • One Solution collect form web for “Visual Studio Online scheduled build can't find my branch”

    Maybe that + is part of a refspec.

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

    Git Baby is a git and github fan, let's start git clone.