Skip to content

Ramisto/Sign-my-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 

Repository files navigation

A bash script for sign your commits

IntroductionRequirementsUsageExamples

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

Bash script to sign commits with a GPG key.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages