George Udosen
George Udosen

Reputation: 936

How to push current Cloud Source Repository using the attached Cloud Build Trigger to another Cloud Source Repository

I have this Cloud Source Repository that has a trigger that builds the docker file and pushes to Cloud Container Registry. I want to be able to push this repo to another Cloud Source Repository from a step in the build file. But I get the following error:


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

This is my build config file:



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"]

Upvotes: 0

Views: 523

Answers (1)

Akshansha Singhal
Akshansha Singhal

Reputation: 862

  1. Try pushing only 5-10 commits at once which might help.

  2. I would like to suggest you to make some changes to your github configuration by increasing the Git buffer size to the largest individual file size of your repo:

    git config --global http.postBuffer 157286400

Upvotes: 1

Related Questions