dev-nguyenhoanganh / personal-profile

The website introduces my journey to becoming a web developer
MIT License
1 stars 0 forks source link

Install and configure the development environment #2

Closed dev-nguyenhoanganh closed 3 days ago

dev-nguyenhoanganh commented 1 week ago

Install and configure the development environment

dev-nguyenhoanganh commented 1 week ago

How to create signature verification for commits

  1. Download then install GPG software
  2. Execute command gpg --full-generate-key then do the following step: Each time commit code, we will need to re-enter the passphrase, so we need to save the passphrase for later use. Image
  3. Execute the following commands
# List the long form of the GPG keys for which we have both a public and private key.
gpg --list-secret-keys --keyid-format=long

# Prints the GPG key ID, in ASCII armor format
gpg --armor --export [short-key]

sec rsa4096/[short-key] 2024-02-12 [SC]

4, Copy GPG key, beginning and ending with

-----BEGIN PGP PUBLIC KEY BLOCK-----
[huge-ascii-key]
-----END PGP PUBLIC KEY BLOCK-----

5, Add the GPG key to your GitHub account: Setting > SSH and GPG keys > New GPG key

Image

6, Telling Git about signing key

git config --global user.signingkey [short-key]
git config --global commit.gpgsign true
git config --global gpg.program "C:/Program Files (x86)/gnupg/bin/gpg"