--------------------------------------------------
create gpg key
--------------------------------------------------
Download and install gpg (in ubuntu gpg is alredy installed)
select RSA and RSA (default)
select 4096 keysize
specify how long the key should be valid (0 default)
enter your name (id github exemple)
enter your email address (like github email adress /!\ important)
veryfy with O
enter paraphrase
copy the id of rsa key
for get your gpg key:
past this id in this command:
Copy your GPG key, beginning with -----BEGIN PGP PUBLIC KEY BLOCK----- and ending with -----END PGP PUBLIC KEY BLOCK-----.
--------------------------------------------------
add to your github account
--------------------------------------------------
In the upper-right corner of any page, click your profile photo, then click Settings.
In the "Access" section of the sidebar, click SSH and GPG keys.
Next to the "GPG keys" header, click New GPG key.
In the "Title" field, type a name for your GPG key.
In the "Key" field, paste the GPG key you copied at precedent step.
Click Add GPG key.
To confirm the action, authenticate to your GitHub account.
--------------------------------------------------
Telling Git about your signing key
--------------------------------------------------
Optionally, to configure Git to sign all commits by default, enter the following command:
initial tuto : here
please like this answer