配置 Git 使用 SSH 签名和验证
106 字
1 分钟
配置 Git 使用 SSH 签名和验证
配置
基础配置
生成一个新的 ssh 密钥:
ssh-keygen -t ed25519 -C "<邮箱>"配置 Git 提交的全局用户名和邮箱:
git config --global user.name "<用户名>"git config --global user.email "<邮箱>"使用 SSH 进行签名
配置 Git 提交自动进行签名:
git config --global commit.gpgsign true配置签名使用 SSH:
git config --global gpg.format ssh配置签名的 SSH 公钥
git config --global user.signingkey <SSH 公钥或私钥文件>References
配置 Git 使用 SSH 签名和验证
https://nekoside.com/posts/git-ssh-sign/
