In my case I could not remove the private repository reference for other reasons so had to investigate further. For me, this was because a single private package was no longer available in a private repository, and so could not be restored.