gemini-cli - 💡(How to fix) Fix Debug error [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26385Fetched 2026-05-03 04:52:15
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1

Error Message

Running hooks in /etc/ca-certificates/update.d... done. Processing triggers for dbus (1.14.10-4ubuntu4.1) ... $ curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o /tmp/install-opentofu.sh $ chmod +x /tmp/install-opentofu.sh $ /tmp/install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}" OpenTofu Installer Installing OpenTofu using the standalone installation method... Downloading OpenTofu version 1.9.0... Performing checksum verification... Checksum for tofu_1.9.0_linux_amd64.zip is 638dd3fb9ecfa6fd9f54a0024b195b12b407c51ccee6f83b18a75a8be79f8214, as expected. Performing signature verification... Downloading signature file... Downloading GPG key... Dearmoring GPG key... Verifying GPG key fingerprint... gpg: directory '/root/.gnupg' created gpg: keybox '/root/.gnupg/pubring.kbx' created gpg: /tmp/tmp.n3OcyaNReW/trustdb: trustdb created gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect gpg: key 0C0AF313E5FD9F80: "OpenTofu (This key is used to sign opentofu providers) [email protected]" not changed gpg: Total number processed: 1 gpg: unchanged: 1 gpg: inserting ownertrust of 6 gpg: Signature made Thu Jan 9 16:11:06 2025 UTC gpg: using RSA key E3E6E43D84CB852EADB0051D0C0AF313E5FD9F80 gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: Good signature from "OpenTofu (This key is used to sign opentofu providers) [email protected]" [ultimate] Primary key fingerprint: E3E6 E43D 84CB 852E ADB0 051D 0C0A F313 E5FD 9F80 Signature verified. Unpacking OpenTofu... Archive: /tmp/tmp.n3OcyaNReW/tofu_1.9.0_linux_amd64.zip inflating: /tmp/tmp.bfFhYzZkQd/CHANGELOG.md
inflating: /tmp/tmp.bfFhYzZkQd/LICENSE
inflating: /tmp/tmp.bfFhYzZkQd/README.md
inflating: /tmp/tmp.bfFhYzZkQd/tofu
Moving OpenTofu installation to /opt/opentofu... Creating tofu symlink at /usr/local/bin/tofu... Checking if OpenTofu is installed correctly... OpenTofu v1.9.0 on linux_amd64 Installation complete. $ rm /tmp/install-opentofu.sh $ eval $(ssh-agent -s) Agent pid 5420 $ echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - /usr/bin/bash: line 199: SSH_PRIVATE_KEY: unbound variable Error loading key "(stdin)": error in libcrypto Running after_script 00:01 Running after script... $ rm -f /tmp/vault_pass Cleaning up project directory and file bas ed variables 00:00 ERROR: Job failed: exit code 1

Code Example

Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
$ curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o /tmp/install-opentofu.sh
$ chmod +x /tmp/install-opentofu.sh
$ /tmp/install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}"
OpenTofu Installer
Installing OpenTofu using the standalone installation method...
Downloading OpenTofu version 1.9.0...
Performing checksum verification...
Checksum for tofu_1.9.0_linux_amd64.zip is 638dd3fb9ecfa6fd9f54a0024b195b12b407c51ccee6f83b18a75a8be79f8214, as expected.
Performing signature verification...
Downloading signature file...
Downloading GPG key...
Dearmoring GPG key...
Verifying GPG key fingerprint...
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /tmp/tmp.n3OcyaNReW/trustdb: trustdb created
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
gpg: key 0C0AF313E5FD9F80: "OpenTofu (This key is used to sign opentofu providers) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg: inserting ownertrust of 6
gpg: Signature made Thu Jan  9 16:11:06 2025 UTC
gpg:                using RSA key E3E6E43D84CB852EADB0051D0C0AF313E5FD9F80
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "OpenTofu (This key is used to sign opentofu providers) <[email protected]>" [ultimate]
Primary key fingerprint: E3E6 E43D 84CB 852E ADB0  051D 0C0A F313 E5FD 9F80
Signature verified.
Unpacking OpenTofu...
Archive:  /tmp/tmp.n3OcyaNReW/tofu_1.9.0_linux_amd64.zip
  inflating: /tmp/tmp.bfFhYzZkQd/CHANGELOG.md  
  inflating: /tmp/tmp.bfFhYzZkQd/LICENSE  
  inflating: /tmp/tmp.bfFhYzZkQd/README.md  
  inflating: /tmp/tmp.bfFhYzZkQd/tofu  
Moving OpenTofu installation to /opt/opentofu...
Creating tofu symlink at /usr/local/bin/tofu...
Checking if OpenTofu is installed correctly...
OpenTofu v1.9.0
on linux_amd64
Installation complete.
$ rm /tmp/install-opentofu.sh
$ eval $(ssh-agent -s)
Agent pid 5420
$ echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
/usr/bin/bash: line 199: SSH_PRIVATE_KEY: unbound variable
Error loading key "(stdin)": error in libcrypto
Running after_script 00:01
Running after script...
$ rm -f /tmp/vault_pass
Cleaning up project directory and file bas ed variables 00:00
ERROR: Job failed: exit code 1
RAW_BUFFERClick to expand / collapse

What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

bug-report-history-1777746234994.json

What did you expect to happen?

Tried to debug this :

Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
$ curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o /tmp/install-opentofu.sh
$ chmod +x /tmp/install-opentofu.sh
$ /tmp/install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}"
OpenTofu Installer
Installing OpenTofu using the standalone installation method...
Downloading OpenTofu version 1.9.0...
Performing checksum verification...
Checksum for tofu_1.9.0_linux_amd64.zip is 638dd3fb9ecfa6fd9f54a0024b195b12b407c51ccee6f83b18a75a8be79f8214, as expected.
Performing signature verification...
Downloading signature file...
Downloading GPG key...
Dearmoring GPG key...
Verifying GPG key fingerprint...
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /tmp/tmp.n3OcyaNReW/trustdb: trustdb created
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
gpg: key 0C0AF313E5FD9F80: "OpenTofu (This key is used to sign opentofu providers) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg: inserting ownertrust of 6
gpg: Signature made Thu Jan  9 16:11:06 2025 UTC
gpg:                using RSA key E3E6E43D84CB852EADB0051D0C0AF313E5FD9F80
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "OpenTofu (This key is used to sign opentofu providers) <[email protected]>" [ultimate]
Primary key fingerprint: E3E6 E43D 84CB 852E ADB0  051D 0C0A F313 E5FD 9F80
Signature verified.
Unpacking OpenTofu...
Archive:  /tmp/tmp.n3OcyaNReW/tofu_1.9.0_linux_amd64.zip
  inflating: /tmp/tmp.bfFhYzZkQd/CHANGELOG.md  
  inflating: /tmp/tmp.bfFhYzZkQd/LICENSE  
  inflating: /tmp/tmp.bfFhYzZkQd/README.md  
  inflating: /tmp/tmp.bfFhYzZkQd/tofu  
Moving OpenTofu installation to /opt/opentofu...
Creating tofu symlink at /usr/local/bin/tofu...
Checking if OpenTofu is installed correctly...
OpenTofu v1.9.0
on linux_amd64
Installation complete.
$ rm /tmp/install-opentofu.sh
$ eval $(ssh-agent -s)
Agent pid 5420
$ echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
/usr/bin/bash: line 199: SSH_PRIVATE_KEY: unbound variable
Error loading key "(stdin)": error in libcrypto
Running after_script 00:01
Running after script...
$ rm -f /tmp/vault_pass
Cleaning up project directory and file bas ed variables 00:00
ERROR: Job failed: exit code 1

Client information

  • CLI Version: 0.40.1
  • Git Commit: 7a382e066
  • Session ID: 39e0eada-4835-48e3-82d0-dcd8d6b87c33
  • Operating System: linux v22.22.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 707.3 MB
  • Terminal Name: xterm.js(6.1.0-beta.197)
  • Terminal Background: #24273a
  • Kitty Keyboard Protocol: Supported
  • IDE Client: VS Code

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue is likely caused by an unbound variable SSH_PRIVATE_KEY which is preventing the SSH key from being added, resulting in a job failure.

Guidance

  • The error message /usr/bin/bash: line 199: SSH_PRIVATE_KEY: unbound variable indicates that the SSH_PRIVATE_KEY variable is not set.
  • Check the environment variables to ensure that SSH_PRIVATE_KEY is properly set before running the script.
  • Verify that the SSH private key is correctly formatted and not corrupted.
  • Consider adding a check to ensure that SSH_PRIVATE_KEY is set before attempting to add it to the SSH agent.

Example

if [ -z "$SSH_PRIVATE_KEY" ]; then
  echo "SSH_PRIVATE_KEY is not set"
  exit 1
fi
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -

Notes

The provided log output suggests that the issue is related to the SSH key addition step, but without more information about the environment and the script being run, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Set the SSH_PRIVATE_KEY variable before running the script to ensure that it is properly configured.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Debug error [1 comments, 2 participants]