Skip to content

Q&A

Mac 安装 权限问题

bash
wode@wodeMacBook-Pro ~ % npm i -g openclaw@latest

npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/lib/node_modules/openclaw
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/openclaw'
npm error     at async mkdir (node:internal/fs/promises:856:10)
npm error     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:572:20
npm error     at async Promise.allSettled (index 0)
npm error     at async #reifyPackages (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:309:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:151:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/lib/node_modules/openclaw'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /Users/wode/.npm/_logs/2026-03-05T11_51_29_925Z-debug-0.log

处理方案:

bash
mkdir -p ~/.npm-global
bash
npm config set prefix '~/.npm-global'
bash
export PATH=~/.npm-global/bin:$PATH
bash
echo $SHELL

zsh

bash
source ~/.zshrc

bash

bash
source ~/.bash_profile
bash
npm config get prefix

Mac 没有配置有效的 SSH 公钥来访问 GitHub 私有仓库

bash
wodeMacBook-Pro:~ wode$ npm install -g openclaw
npm error code 128
npm error An unknown git error occurred
npm error command git --no-replace-objects ls-remote ssh://git@github.com/whiskeysockets/libsignal-node.git
npm error git@github.com: Permission denied (publickey).
npm error fatal: Could not read from remote repository.
npm error
npm error Please make sure you have the correct access rights
npm error and the repository exists.
npm error A complete log of this run can be found in: /Users/wode/.npm/_logs/2026-03-07T13_45_15_177Z-debug-0.log

处理方案:

bash
git config --global http.sslVerify false
bash
git config --global url."https://ghfast.top/https://github.com/".insteadOf https://github.com/
bash
git config --global url."https://ghfast.top/https://github.com/".insteadOf ssh://git@github.com/

处理 2026.3.2+ 默认权限问题

bash
openclaw config set tools.profile "full"
openclaw gateway restart