0

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

Gourav B
  • 864
  • 5
  • 17
George Udosen
  • 906
  • 1
  • 13
  • 28
  • http error code 500 = "internal error": the server you contacted tripped, fell over, and yelled "help". It's a problem *over there*, so go over there (or send the medics over there) to fix it over there. ("There" is either gcr.io or google.com, I assume.) – torek Dec 11 '21 at 22:16
  • It is google.com in this case ... – George Udosen Dec 12 '21 at 18:47
  • Perhaps Google were being DDoS-ed at the time. If it's repeatable and there are no reports of attacks going on, you should poke someone at Google about it. – torek Dec 12 '21 at 18:53
  • Hi @George Udosen, I have posted an answer. Have you seen that? And did it help you? – Akshansha Singhal Dec 17 '21 at 09:48

1 Answers1

1
  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