Skip to content

About

A small script that makes it easier to create a GPG key and configure git

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

A bash script for sign your commits

Introduction • Requirements • Usage • Examples

Introduction

This bash script has been designed to help you configure your environment to sign your commits with a GPG key.

Official documentation :

Requirements

  • Ubuntu or Debian OS
  • gpg
  • git
  • root privilege

Usage

$ su
$ chmod +x sign-my-code.sh
$ ./sign-my-code.sh

or

$ sudo chmod +x sign-my-code.sh
$ sudo ./sign-my-code.sh

Scenario 1 : You want to sign your commits from scratch

Follow these steps in order :

  • Execute this script with root privilege
  • Install gpg & git packages
  • Generate a new GPG key
  • Add a GPG key to your GitHub account
  • Tell Git about your signing key
  • Sign commits examples
  • Quit

Scenario 2 : You want to sign your commits with an existing GPG key, and GPG/Git packages is already installed

Follow these steps in order :

  • Add a GPG key to your GitHub account
  • Tell Git about your signing key
  • Sign commits examples
  • Quit

Other scenarios are possible, just select the option that will help you ;-)

Examples

Test performed in an Xubuntu 22.04.3 LTS virtualbox machine with root privilege.

ubuntu-lab

Execute this script :

chmod

Install gpg & git packages :

install-git-gpg

About

A small script that makes it easier to create a GPG key and configure git

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages