0

我有这个 Cloud Source Repository,它有一个触发器,可以构建 docker 文件并推送到 Cloud Container Registry。我希望能够从构建文件中的一个步骤将此 repo 推送到另一个 Cloud Source Repository。但我收到以下错误:


Already have image (with digest): gcr.io/cloud-builders/git
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

这是我的构建配置文件:



steps:
  - name: gcr.io/cloud-builders/docker
    args:
      ["build", "-t", "gcr.io/$PROJECT_ID/${REPO_NAME}:${SHORT_SHA}", "."]

  - name: "gcr.io/cloud-builders/docker"
    args: ["push", "gcr.io/$PROJECT_ID/${REPO_NAME}"]

  - name: "gcr.io/cloud-builders/git"
    args: ["push", "--force", "https://source.developers.google.com/p/${_DOWNSTREAM_PROJECT}/r/${_DOWNSTREAM_REPO}", "master"]

4

1 回答 1

1
  1. 尝试一次只推送 5-10 个提交,这可能会有所帮助。

  2. 我想建议您通过将 Git 缓冲区大小增加到您的存储库的最大单个文件大小来对您的 github 配置进行一些更改:

    git config --global http.postBuffer 157286400

于 2021-12-14T08:45:49.717 回答