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
  • Changing Excel spreadsheet cells through the usage of Jenkins
  • Cannot run Xcode (7.3) UI tests in Jenkins
  • Check if specific file in git repository has changed
  • How can you automatically remove trailing whitespace in vim
  • Retrieve parameters from properties file
  • 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?

  • Jenkins can't launch selenium tests (Timed out waiting for profile to be created)
  • Trouble setting up git deployment via PHP on IIS
  • How to get Team City to only trigger a build on a Github pull request if it contains changes in a specific folder
  • Change number of threads for Jenkins server
  • How can I automatically keep two bare git repos in sync?
  • Azure - deploying from Bitbucket
  • 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):

    dev:refs/remotes/origin/dev
    
    Git Baby is a git and github fan, let's start git clone.