+44
-1
@@ -175,4 +175,47 @@ services:
|
|||||||
|
|
||||||
4. 将 `System.IsPinnedToNameSpaceTree` 值修改为 `0` > 确定。
|
4. 将 `System.IsPinnedToNameSpaceTree` 值修改为 `0` > 确定。
|
||||||
|
|
||||||
5. 最后,重启你的电脑。
|
5. 最后,重启你的电脑。
|
||||||
|
|
||||||
|
## 修复 macOS Tahoe 26.4 git 提交时调用 ed25519-sk SSH 密钥报错
|
||||||
|
|
||||||
|
### 环境
|
||||||
|
|
||||||
|
- macOS Tahoe 26.4
|
||||||
|
- Visual Studio Code 1.113.0
|
||||||
|
|
||||||
|
### 报错
|
||||||
|
|
||||||
|
```
|
||||||
|
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
|
||||||
|
error: Signing file /var/folders/71/0cg33245411cnc0d7zfrkgqm0000gn/T//.git_signing_buffer_tmpLjPKBL
|
||||||
|
Confirm user presence for key ED25519-SK SHA256:11zuoQXlgOuWaSqwMjnI0RJvlDEj+ZdgnlKZd8xJNC0
|
||||||
|
No FIDO SecurityKeyProvider specified?
|
||||||
|
Couldn't sign message: invalid format?
|
||||||
|
Signing /var/folders/71/0cg33245411cnc0d7zfrkgqm0000gn/T//.git_signing_buffer_tmpLjPKBL failed: invalid format?
|
||||||
|
|
||||||
|
fatal: failed to write commit object
|
||||||
|
```
|
||||||
|
|
||||||
|
### 解决办法
|
||||||
|
|
||||||
|
```
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
|
brew uninstall --force openssh libfido2
|
||||||
|
|
||||||
|
brew install openssh libfido2
|
||||||
|
|
||||||
|
brew list libfido2
|
||||||
|
|
||||||
|
# FIDO 驱动文件: /opt/homebrew/Cellar/libfido2/1.16.0_1/lib/libfido2.1.16.0.dylib
|
||||||
|
|
||||||
|
# 重新生成密钥 该密钥不会存储在 YubiKey 设备本身
|
||||||
|
/opt/homebrew/bin/ssh-keygen -t ed25519-sk -f ~/.ssh/git-signing-for-mac
|
||||||
|
|
||||||
|
git config --global gpg.ssh.program "/opt/homebrew/bin/ssh-keygen"
|
||||||
|
git config --global gpg.ssh.ssh-keygen-extra-args "-P /opt/homebrew/Cellar/libfido2/1.16.0_1/lib/libfido2.1.16.0.dylib" # 此处需指向 FIDO 驱动文件
|
||||||
|
git config --global user.signingkey "~/.ssh/git-signing-for-mac.pub" # 新生成的公钥记得在 GitHub 注册
|
||||||
|
|
||||||
|
code . # 通过终端启动 Visual Studio Code
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user