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

标签 git azure bitbucket azure-web-app-service kudu

我们有一个 CI 工作流程,使用其 KUDU 构建服务将 bitbucket(使用管道)推送到 Azure Web 应用程序。然而,几乎每次运行时,我们都会收到 git 错误:

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

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

我们运行的命令:git push https://XXX:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="451d1d1d1d051220272435353037296b3626286b243f303720322027362c3120366b2b2031" rel="noreferrer noopener nofollow">[email protected]</a>/reponame.git testing:master 我还尝试添加 -f

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

最佳答案

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

image: python:2.7.13

clone:
  depth: full

pipelines:

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

关于Git 错误 "unable to migrate objects to permanent storage"从 bitbucket 推送到 Azure webapp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54207827/

相关文章:

Git push origin master 返回 Error cannot spawn ... 为什么?

git - 如何将远程master merge 到本地分支

.net - .NET 开发人员的 Git 与 Mercurial?

git - 跳过提交并在 Git 中

eclipse - 如何分发 Eclipse 更新站点

git - "HEAD -> branch, origin/branch"在 git 提交日志中意味着什么?

c# - 如何为 Web API 指定不同的 AADInstance?

ASP.NET 身份与 Azure AD B2C

Azure DNS 名称解析问题

linux - 从一个分支克隆三个其他分支