Cannot determine the organization name for this ‘dev.azure.com’ remote url

Whilst trying to set up Visual Studio to use a git repo hosted on Azure DevOps, we encountered this error. Cannot determine the organization name for this ‘dev.azure.com’ remote url. ensure the credential.usehttppath configuration value is set, or set the organization name as the user in the remote url ‘{org}@dev.azure.com’.