Gitload is a versatile script designed to streamline the process of loading SSH and GPG keys, making it easier for users to manage their encrypted data and automate key-related tasks. This repository contains the source code and packaging information for the Gitload Debian package.
Load SSH and GPG Keys: Automatically load SSH and GPG keys from encrypted files.
Encrypt and Decrypt Data: Easily encrypt and decrypt data files using OpenSSL.
Integration with Funtoo Keychain: Seamlessly integrate with Funtoo Keychain to manage SSH and GPG agents.
To install the Gitload package, follow these steps:
- Clone the Repository:
git clone https://github.com/CosmicDNA/gitload.git
- Build the Debian Package:
dpkg-deb --build gitload
- Install the Package:
sudo dpkg -i gitload.deb
- Source the Script to Your Shell Configuration File:
. /usr/local/gitload/gitload.sh
gitload -i zsh
Tip
Use bash instead of zsh for bash shell, for example: gitload -i bash
.
-
Set the
PASSKEY
Environment Variable: Ensure you have a PASSKEY environment variable set for the encryption and decryption processes. -
Create the Encrypted SSH Password File. For example:
gitload -e your_ssh_password ssh_password_file
- Create the Encrypted Keychain Arguments: Use the gitload -e command to create the encrypted keychain arguments. The keychain_args_file should be a string containing both the SSH file path and the GPG key. For example:
gitload -e "~/.ssh/id_john_doe 3F4A1B2C5D6E7F8G" keychain_args_file
- Use the Encrypted Files: Finally, use the encrypted files with the gitload command:
gitload ssh_password_file keychain_args_file
- Execute git commands with GPG signing and SSH support:
git commit -m ":tada:"
Now you can commit utilising your ssh but also signing with your loaded gpg key in a breeze.
After installation and sourcing the script, you can use the gitload command in your shell. The command can be used for:
- Loading SSH and GPG Keys
- Encrypting Data to Gitload store
- Decrypting Data from Gitload store
- Removing an encrypted file from gitload store
- Installing source hook to rc file
- Displaying Help
Caution
For the former 3 cases make sure the PASSKEY
environment variable is properly set before running gitload command. This variable is crucial because it is used to encrypt / decrypt information back and forth from gitload store.
To load SSH and GPG keys from encrypted files, use the following command:
gitload ssh_password_file keychain_args_file
To encrypt data to a specified filename, use the -e option:
gitload -e "data to encrypt" filename
To decrypt a specified filename, use the -d option:
gitload -d filename
gitload -r filename
gitload -i zsh
Tip
Use bash instead of zsh for bash shell, for example: gitload -i bash
.
To display usage information, use the -h option:
gitload -h
The gitload script automates the process of loading SSH and GPG keys by decrypting the provided encrypted files and using Funtoo Keychain to manage the SSH and GPG agents. This ensures that your keys are securely loaded and available for use.
The script provides functionality to encrypt and decrypt data files using OpenSSL. This allows users to securely store and manage sensitive information. The encrypted files are stored at "/var/lib/gitload/keys/$USER"
.
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.
This project is licensed under the MIT License.