【App Service】VS Code直接部署App Service时候遇见 “fatal: not a git repository (or any of the parent directories): .git” - LuBu0505/My-Code GitHub Wiki

问题描述

通过VS Code发布Python App Service的时候,遇见了发布失败错误:

The deployment failed with error: fatal: not a git repository (or any of the parent directories): .git . Please take a few minutes to help us improve the deployment experience image.png

问题解答

这是因为选择的App Service使用了本地Git部署的原因,而当前的Python App Service中并没有包含 .git文件,它并不是一个本地仓库。所以部署的时候提示了not a git repository。

只要修改App Service的部署方式,去掉本地Git就可以解决问题。

Azure Web App --> Deployment Center --> Disconnect Local Git. image.png

修改Deployment Center,去掉Local Git后,重新部署成功。 image.png

当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!