How To Install git-crypt on CentOS 8

In this tutorial we learn how to install git-crypt on CentOS 8. git-crypt is Transparent file encryption in git

Introduction

In this tutorial we learn how to install git-crypt on CentOS 8.

What is git-crypt

git-crypt enables transparent encryption and decryption of files in a git repository. Files which you choose to protect are encrypted when committed, and decrypted when checked out. git-crypt lets you freely share a repository containing a mix of public and private content. git-crypt gracefully degrades, so developers without the secret key can still clone and commit to a repository with encrypted files. This lets you store your secret material (such as keys or passwords) in the same repository as your code, without requiring you to lock down your entire repository.

We can use yum or dnf to install git-crypt on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install git-crypt.

Install git-crypt on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install git-crypt using yum by running the following command:

sudo yum -y install git-crypt

Install git-crypt on CentOS 8 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install git-crypt using dnf by running the following command:

sudo dnf -y install git-crypt

How To Uninstall git-crypt on CentOS 8

To uninstall only the git-crypt package we can use the following command:

sudo dnf remove git-crypt

References

Summary

In this tutorial we learn how to install git-crypt on CentOS 8 using yum and dnf.