GPG 操作备忘 #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GPG
创建 公钥/私钥
gpg --full-gen-key查看公钥列表
gpg --list-keys输出公钥内容
gpg --armor --export <公钥指纹>(指纹可以从上面的查看公钥列表中找)
git提交签名
设置签名公钥
git config user.signingkey <公钥指纹>
每次提交自动使用签名
git config commit.gpgsign true本次提交使用签名
git commit -S -m "My commit msg"查看提交记录的签名信息
git log --show-signature导出公钥
gpg --armor -o public-file.key --export <公钥指纹>导出私钥
gpg --armor -o private-file.key --export-secret-keys <公钥指纹>导入(公钥或私钥)
gpg --import xxxx.key删除公钥和私钥
gpg --delete-secret-and-public-key <公钥指纹>提交与检出均不转换LF和CRLF
git config --global core.autocrlf false