1
0

配置 Git 使用 SSH 签名和验证

2026-02-03
2026-06-18
Git
ssh-keygen -t ed25519 -C "你的邮箱地址"

先用该命令生成一个新的 ssh 密钥

然后配置 git

git config --global user.name "你的用户名"
git config --global user.email "你的邮箱地址"
git config --global commit.gpgsign true
git config --global gpg.format ssh
git config --global user.signingkey <你的 ssh 私钥 path>(公钥 path 也行)

配置 Git 使用 SSH 签名和验证
/archives/git-ssh-sign
作者
nekoside
发布于
2026-02-03
许可协议
CC BY-NC-SA 4.0

评论