From 4fd89ab1559fdb110e2ad7ce0e8f160166ac8343 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 3 Jan 2026 06:51:43 +0000 Subject: [PATCH 1/3] Initial plan From 7deab5d18e8946562df14067c5a1f136aac5a40d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 3 Jan 2026 06:55:05 +0000 Subject: [PATCH 2/3] Fix subscription git clone failure by setting TMPDIR Set TMPDIR=/tmp before git clone operations to fix "unable to get random bytes for temporary file" error in Docker environments with restricted system calls (e.g., Synology NAS). Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- shell/share.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/share.sh b/shell/share.sh index cad30659..88cc8abd 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -258,8 +258,11 @@ git_clone_scripts() { set_proxy "$proxy" + # Set TMPDIR to /tmp to avoid "unable to get random bytes" error in some Docker environments + export TMPDIR=/tmp git clone -q --depth=1 $part_cmd $url $dir exit_status=$? + unset TMPDIR unset_proxy } From 60f8286825191ed333f146be45f5c1b307fa858c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 3 Jan 2026 06:56:08 +0000 Subject: [PATCH 3/3] Preserve original TMPDIR value when setting temporary directory Improve git_clone_scripts to save and restore the original TMPDIR value instead of unconditionally unsetting it, avoiding unintended side effects. Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- shell/share.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/share.sh b/shell/share.sh index 88cc8abd..2923b2bb 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -259,10 +259,15 @@ git_clone_scripts() { set_proxy "$proxy" # Set TMPDIR to /tmp to avoid "unable to get random bytes" error in some Docker environments + local original_tmpdir="${TMPDIR:-}" export TMPDIR=/tmp git clone -q --depth=1 $part_cmd $url $dir exit_status=$? - unset TMPDIR + if [[ -n "$original_tmpdir" ]]; then + export TMPDIR="$original_tmpdir" + else + unset TMPDIR + fi unset_proxy }