Use https and add fluttergithubbot with the associated PAT into the remote URL

Due to SSH not supported on fluttergithubbot account, https protocol will be used. Also, since explicitly setting the user:PAT in the remote URL is required since gh was not providing credentials, the use of gh is no longer necessary.

Successful led run https://chromium-swarm.appspot.com/task?id=611e8ea03d929710

Change-Id: I8e35b0967f604f4b012796f992d3e0c8cb060ccf
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/40921
Reviewed-by: Drew Roen <drewroen@google.com>
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Jesse Seales <jseales@google.com>
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta.json
index 594a6ae..c1a0abd 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta_dry_run.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta_dry_run.json
index c45d80c..61fd454 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta_dry_run.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_beta_dry_run.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "echo",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable.json
index b56b82e..c2443af 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable_dry_run.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable_dry_run.json
index 7dbcf5a..c66956e 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable_dry_run.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3-4.5.pre_stable_dry_run.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "echo",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta.json
index 57dc0f4..e79aef0 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta_dry_run.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta_dry_run.json
index ea89584..c8b1b82 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta_dry_run.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_beta_dry_run.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "echo",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable.json
index ccc8d1d..2e02b10 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable_dry_run.json b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable_dry_run.json
index c66fe20..ea6cf97 100644
--- a/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable_dry_run.json
+++ b/recipes/release/release_publish.expected/flutter-2.8-candidate.9_1.2.3_stable_dry_run.json
@@ -132,41 +132,6 @@
       "cipd",
       "ensure",
       "-root",
-      "[CACHE]/gh-cli",
-      "-ensure-file",
-      "flutter_internal/tools/gh-cli/${platform} latest",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"flutter_internal/tools/gh-cli/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[CACHE]/gh-cli/bin/gh",
-      "--version"
-    ],
-    "name": "check gh version"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
       "[START_DIR]/cloudkms",
       "-ensure-file",
       "infra/tools/luci/cloudkms/${platform} latest",
@@ -190,11 +155,10 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
-    "name": "ensure_installed (2)",
+    "name": "ensure_installed",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
@@ -236,8 +200,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -268,8 +231,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "cloudkms get key"
@@ -295,8 +257,7 @@
     "env_prefixes": {
       "PATH": [
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "infra_step": true,
@@ -310,6 +271,7 @@
     "env": {
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
       "DRY_RUN_CMD": "echo",
+      "GITHUB_USER": "fluttergithubbot",
       "GIT_BRANCH": "flutter-2.8-candidate.9",
       "LUCI_BRANCH": "",
       "LUCI_CI": "True",
@@ -327,10 +289,8 @@
       "PATH": [
         "[START_DIR]/flutter/bin",
         "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin",
         "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin",
-        "[CACHE]/gh-cli/bin"
+        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
       ]
     },
     "name": "Tag and push release"
diff --git a/recipes/release/release_publish.py b/recipes/release/release_publish.py
index 3512e4b..f63892c 100644
--- a/recipes/release/release_publish.py
+++ b/recipes/release/release_publish.py
@@ -74,9 +74,6 @@
       api.properties.get('dependencies', []),
   )
 
-  # install gh cli
-  api.flutter_deps.gh_cli(env, env_prefixes, 'latest')
-
   with api.context(env=env, env_prefixes=env_prefixes, cwd=checkout_path):
     token_decrypted = api.path['cleanup'].join('token.txt')
     api.kms.get_secret('flutter-release-github-token.encrypted', token_decrypted)
@@ -93,6 +90,7 @@
     env['RELEASE_GIT_HASH'] = release_git_hash
     env['RELEASE_CHANNEL'] = release_channel
     env['GIT_BRANCH'] = git_branch
+    env['GITHUB_USER'] = 'fluttergithubbot'
 
     # Run script within a new context to use the new env variables.
     with api.context(env=env, env_prefixes=env_prefixes):
diff --git a/recipes/release/release_publish.resources/push_release.sh b/recipes/release/release_publish.resources/push_release.sh
index 653838e..a53931b 100644
--- a/recipes/release/release_publish.resources/push_release.sh
+++ b/recipes/release/release_publish.resources/push_release.sh
@@ -3,11 +3,12 @@
 # Helper script to run auth and git authenticated commands from the same
 # terminal context.
 
-set -ex
-gh --version
-gh auth login --hostname github.com --git-protocol https --with-token < $TOKEN_PATH
-gh auth setup-git
+set -e
+TOKEN=$(cat $TOKEN_PATH)
+git checkout $GIT_BRANCH
+git branch
 git tag $TAG $RELEASE_GIT_HASH || true
 git rev-list -n 1 origin/$GIT_BRANCH
+git remote set-url origin https://$GITHUB_USER:$TOKEN@github.com/flutter/flutter.git
 $DRY_RUN_CMD git push origin $TAG || true
 $DRY_RUN_CMD git push origin HEAD:$RELEASE_CHANNEL