google-gemini/gemini-cli · error · OrchestrationError
Failed to push git branch: {e}
Error message
Failed to push git branch: {e} What it means
Error "Failed to push git branch: {e}" thrown in google-gemini/gemini-cli.
Source
Thrown at tools/caretaker-agent/cloudrun/pr-generator/workflow/orchestrator.py:665
# Push branch securely using in-memory auth headers (force pushes are supported to override prior retries)
git_env = os.environ.copy()
if self.config.git_token:
auth_bytes = f"x-access-token:{self.config.git_token}".encode("utf-8")
auth_b64 = base64.b64encode(auth_bytes).decode("utf-8")
git_env["GIT_CONFIG_COUNT"] = "1"
git_env["GIT_CONFIG_KEY_0"] = "http.extraHeader"
git_env["GIT_CONFIG_VALUE_0"] = f"AUTHORIZATION: basic {auth_b64}"
try:
CommandExecutor.run(
["git", "push", "-f", "origin", f"HEAD:refs/heads/{branch_name}"],
cwd=self.config.pr_repo_path,
env=git_env,
)
logging.info("Branch push to remote succeeded.")
except CommandExecutionError as e:
logging.error("Failed to push git branch: %s", e)
raise OrchestrationError(f"Failed to push git branch: {e}") from e
# Submit Pull Request
if self.config.git_token:
repo_parts = self.config.repo_url.rstrip("/").split("/")
owner = repo_parts[-2]
repo_name = self.config.repo_name
pr_title = recommended_commit_msg if recommended_commit_msg else f"[SSR Agent] Issue Fix: issues/{issue_num}"
pr_body = recommended_pr_desc if recommended_pr_desc else (
f"This Pull Request was automatically generated by the SSR Code Generator Agent "
f"to resolve issue `{issue_id}`.\n\n"
f"### Summary of Changes:\n"
f"Applied targeted modifications to address the issue, validated with local compilation and unit tests."
)
client = GitHubClient(owner=owner, repo=repo_name, token=self.config.git_token)
try:
pr_number = client.create_pull_request(View on GitHub (pinned to 5024443c72)
When it happens
Trigger: Thrown at tools/caretaker-agent/cloudrun/pr-generator/workflow/orchestrator.py:665 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of google-gemini/gemini-cli@5024443c72 (2026-08-12).
Data as JSON: /api/errors/8aeb67bfb91be6aa.
Report an issue: GitHub.