Fixing the Unable move and reuse existing repository to required location. warning in Azure DevOps

Don Victor
2 min readNov 13, 2021

If you have an Azure DevOps pipeline where you checkout more than one repository, you will see this warning in your build results.

While this is not fatal, it can cause warning fatigue - resulting in valid warnings being missed because you are used to seeing false warnings.

While the related GitHub issue and linked Visual Studio support issue are both closed, I was still getting the warning.

The Workaround

As documented in this GitHub comment and this StackOverflow answer, adding a task to create a folder before you do the checkout gets rid of the warning.

Gotchas using the Workaround

I had to fiddle around with the workaround a bit to get it er… working. My pipeline looked like this originally.

    ...
steps:
- checkout: self
displayName: Clone the repository
path: s
- checkout: supporting
displayName: Clone the supporting repository
path: s/supporting
...

I was cloning the main repository (to a folder s) and a supporting repository that contained my build scripts (to a folder s/supporting). I was getting the warning on the 2nd task.

My final pipeline with no warnings looked like this.

...
steps:

--

--