Generating a GPG key for git tagging

前端 未结 3 660
Happy的楠姐
Happy的楠姐 2020-12-23 14:14

I\'m trying to create signed tags in GitHub using the git command line. I generated a GPG key with a (sample) username Full Name (skytreader)

3条回答
  •  春和景丽
    2020-12-23 14:36

    If you have a key already generated, you can tell git to use that specific key without worrying about matching between your git user ID (name+email) and the GPG key's ID. You should have your git user.email match one of the emails on your GPG key for your signed tags or commits to be useful to other users, though.

    To set the key for global use on your computer, set your git global config with:

    git config --global user.signingkey 6AB3587A
    

    Or, you can set the user.signingkey for only the current repository you're in with:

    git config user.signingkey 6AB3587A
    

提交回复
热议问题