Skip to main content

对标记签名

使用 GPG、SSH 或 S/MIME,可以在本地对标记进行签名。

注意

如果 Git 客户端配置为默认对提交进行签名,GitHub Desktop 仅支持提交签名。

  1. 若要对标记进行签名,请将 -s 添加到 git tag 命令。

    $ git tag -s MYTAG
    # Creates a signed tag
    
  2. 通过运行 git tag -v [tag-name] 验证已签名的标记。

    $ git tag -v MYTAG
    # Verifies the signed tag
    

延伸阅读

  •         [AUTOTITLE](/repositories/releasing-projects-on-github/viewing-your-repositorys-releases-and-tags)
    
  •         [AUTOTITLE](/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key)
    
  •         [AUTOTITLE](/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key)
    
  •         [AUTOTITLE](/authentication/managing-commit-signature-verification/signing-commits)