-
+
通用版
.AppImage
-
+
Debian / Ubuntu
.deb
diff --git a/package.json b/package.json
index 64e0f55..64a5786 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "clawpanel",
- "version": "0.8.5",
+ "version": "0.8.6",
"private": true,
"description": "ClawPanel - OpenClaw 可视化管理面板,基于 Tauri v2 的跨平台桌面应用",
"type": "module",
diff --git a/scripts/dev-api.js b/scripts/dev-api.js
index 1ee802e..7146ade 100644
--- a/scripts/dev-api.js
+++ b/scripts/dev-api.js
@@ -2704,8 +2704,21 @@ const handlers = {
const pkg = source === 'official' ? 'openclaw' : '@qingchencloud/openclaw-zh'
const ver = version || 'latest'
const npmBin = isWindows ? 'npm.cmd' : 'npm'
+ // Configure Git HTTPS before npm install to prevent SSH auth failures
+ try { execSync('git config --global --unset-all url.https://github.com/.insteadOf 2>&1', { windowsHide: true }) } catch {}
+ for (const from of ['ssh://git@github.com/', 'git@github.com:', 'git://github.com/', 'git+ssh://git@github.com/']) {
+ try { execSync(`git config --global --add url.https://github.com/.insteadOf "${from}"`, { windowsHide: true }) } catch {}
+ }
+ const gitEnv = {
+ GIT_TERMINAL_PROMPT: '0',
+ GIT_CONFIG_COUNT: '4',
+ GIT_CONFIG_KEY_0: 'url.https://github.com/.insteadOf', GIT_CONFIG_VALUE_0: 'ssh://git@github.com/',
+ GIT_CONFIG_KEY_1: 'url.https://github.com/.insteadOf', GIT_CONFIG_VALUE_1: 'git@github.com:',
+ GIT_CONFIG_KEY_2: 'url.https://github.com/.insteadOf', GIT_CONFIG_VALUE_2: 'git://github.com/',
+ GIT_CONFIG_KEY_3: 'url.https://github.com/.insteadOf', GIT_CONFIG_VALUE_3: 'git+ssh://git@github.com/',
+ }
try {
- const out = execSync(`${npmBin} install ${pkg}@${ver} --prefix "${OPENCLAW_DIR}" 2>&1`, { timeout: 120000, windowsHide: true }).toString()
+ const out = execSync(`${npmBin} install -g ${pkg}@${ver} --registry https://registry.npmmirror.com 2>&1`, { timeout: 120000, windowsHide: true, env: { ...process.env, ...gitEnv } }).toString()
const action = ver === 'latest' ? '升级' : '安装'
return `${action}完成 (${pkg}@${ver})\n${out.slice(-200)}`
} catch (e) {
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 9450cbe..5a2ec53 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "clawpanel"
-version = "0.8.5"
+version = "0.8.6"
edition = "2021"
description = "ClawPanel - OpenClaw 可视化管理面板"
authors = ["qingchencloud"]
diff --git a/src-tauri/src/commands/config.rs b/src-tauri/src/commands/config.rs
index b8f92e7..179b157 100644
--- a/src-tauri/src/commands/config.rs
+++ b/src-tauri/src/commands/config.rs
@@ -691,6 +691,17 @@ pub async fn upgrade_openclaw(
"GIT_SSH_COMMAND",
"ssh -o BatchMode=yes -o StrictHostKeyChecking=no",
)
+ // Force HTTPS insteadOf via env vars — ensures npm-spawned git subprocesses also use HTTPS
+ // even if global git config didn't take effect (e.g. git not in PATH, or Windows permission issues)
+ .env("GIT_CONFIG_COUNT", "4")
+ .env("GIT_CONFIG_KEY_0", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_0", "ssh://git@github.com/")
+ .env("GIT_CONFIG_KEY_1", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_1", "git@github.com:")
+ .env("GIT_CONFIG_KEY_2", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_2", "git://github.com/")
+ .env("GIT_CONFIG_KEY_3", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_3", "git+ssh://git@github.com/")
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()
@@ -750,6 +761,15 @@ pub async fn upgrade_openclaw(
"GIT_SSH_COMMAND",
"ssh -o BatchMode=yes -o StrictHostKeyChecking=no",
)
+ .env("GIT_CONFIG_COUNT", "4")
+ .env("GIT_CONFIG_KEY_0", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_0", "ssh://git@github.com/")
+ .env("GIT_CONFIG_KEY_1", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_1", "git@github.com:")
+ .env("GIT_CONFIG_KEY_2", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_2", "git://github.com/")
+ .env("GIT_CONFIG_KEY_3", "url.https://github.com/.insteadOf")
+ .env("GIT_CONFIG_VALUE_3", "git+ssh://git@github.com/")
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 936d4cb..3b4d622 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
"productName": "ClawPanel",
- "version": "0.8.5",
+ "version": "0.8.6",
"identifier": "ai.openclaw.clawpanel",
"build": {
"frontendDist": "../dist",
diff --git a/src/lib/error-diagnosis.js b/src/lib/error-diagnosis.js
index 63470ee..0a9afbf 100644
--- a/src/lib/error-diagnosis.js
+++ b/src/lib/error-diagnosis.js
@@ -14,28 +14,28 @@ export function diagnoseInstallError(errStr) {
// ===== 1. Git 相关 =====
- // git SSH 权限问题(有 git 但没配 SSH Key)
- if (s.includes('permission denied (publickey)') || s.includes('ssh://git@github') || s.includes('git@github.com')) {
+ // git SSH 权限问题(有 git 但没配 SSH Key)— 只匹配明确的 SSH 失败信号
+ if (s.includes('permission denied (publickey)') || s.includes('host key verification failed')) {
return {
- title: '安装失败 — Git SSH 权限',
- hint: '依赖包用了 SSH 协议拉取代码,但你没配 GitHub SSH Key。运行以下命令改用 HTTPS:',
- command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com: && git config --global --add url."https://github.com/".insteadOf git://github.com/',
+ title: '安装失败 — Git SSH 认证被拒绝',
+ hint: 'GitHub SSH 认证失败。ClawPanel 已尝试自动配置 HTTPS 替代,但可能未生效。请在终端手动执行:',
+ command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com: && git config --global --add url."https://github.com/".insteadOf git://github.com/ && git config --global --add url."https://github.com/".insteadOf git+ssh://git@github.com/',
}
}
// git exit 128:优先判断是 SSH 失败还是 Git 未安装
if (s.includes('code 128') || s.includes('exit 128')) {
- if (s.includes('ssh') || s.includes('git@') || s.includes('publickey') || s.includes('access rights')) {
+ if (s.includes('permission denied') || s.includes('publickey') || s.includes('host key verification')) {
return {
- title: '安装失败 — Git SSH 权限',
- hint: '依赖包用了 SSH 协议拉取代码,但你没配 GitHub SSH Key。运行以下命令改用 HTTPS:',
- command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com: && git config --global --add url."https://github.com/".insteadOf git://github.com/',
+ title: '安装失败 — Git SSH 认证被拒绝',
+ hint: 'GitHub SSH 认证失败。ClawPanel 已尝试自动配置 HTTPS 替代,但可能未生效。请在终端手动执行后重试:',
+ command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com: && git config --global --add url."https://github.com/".insteadOf git://github.com/ && git config --global --add url."https://github.com/".insteadOf git+ssh://git@github.com/',
}
}
return {
- title: '安装失败 — Git 错误',
- hint: 'Git 操作返回错误(exit 128)。可能是 Git 未安装,或 SSH 认证失败。请确认 Git 已安装,或手动执行以下命令切换到 HTTPS 模式:',
- command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com:',
+ title: '安装失败 — Git 拉取依赖错误',
+ hint: 'Git 操作失败(exit 128)。可能是网络问题或 SSH 认证失败。请先确认网络正常,然后在终端手动执行以下命令后重试:',
+ command: 'git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && git config --global --add url."https://github.com/".insteadOf git@github.com: && git config --global --add url."https://github.com/".insteadOf git+ssh://git@github.com/',
}
}