Git 错误 "unable to migrate objects to permanent storage" 从 bitbucket 推送到 Azure webapp

Git error "unable to migrate objects to permanent storage" pushing to Azure webapp from bitbucket

我们有一个 CI 工作流,它是 bitbucket(使用管道)使用他们的 KUDU 构建服务推送到 Azure webapp。但是,几乎每次 运行 时,我们都会收到 git 错误:

! [remote rejected] testing -> master (unable to migrate objects to permanent storage)

如果我 运行 来自 git 的本地副本的完全相同的命令,它每次都能正常工作。来自 Bitbucket,有时可以,但很少。

我们运行的命令:git push https://XXX:XXXX@Webappurl.scm.azurewebsites.net/reponame.git testing:master 我也试过添加 -f

似乎有几个人遇到过这个问题,here, here, and here。但没有答案。为每个 CI 构建从本地 git 手动推送并不理想。有任何想法吗?我的 Web 应用程序有足够的存储空间,但不确定如何检查任何进一步的权限问题。

我通过在 Bitbucket 管道中添加克隆设置解决了这个问题。我不确定为什么会这样,但我之前添加它来解决这个问题,但不久前将其删除。我又开始遇到这个问题,所以添加它解决了问题。但警告是,这可能会稍微减慢您的部署速度,因为 git 将在管道容器上进行完整克隆。这是我的 bitbucket-pipelines.yml 配置片段。它只是推送到 azure deployment git url。添加 "clone depth: full" 为我解决了这个问题:

image: python:2.7.13

clone:
  depth: full

pipelines:

  branches:
    master:
      - step:
          script:
            - git push "https:/...