A C implementation of GitKeyKit, originally created in TypeScript.
A C implementation of GitKeyKit, originally created in TypeScript. This port brings the same simplified PGP key management for Git commit signing to C, making it more portable and dependency-free.
GitKeyKit is a lightweight command-line tool that simplifies PGP key management for Git commit signing. It automates the process of creating, importing, and configuring GPG keys for Git commit verification.
- Create PGP Keys: Automatically generate new PGP keys using your Git user information
- Import Existing Keys: Import your existing PGP keys seamlessly
- Git Configuration: Automatically configure Git to use your PGP key for commit signing
- Cross-Platform: Works on both Windows and Unix-based systems
- Easy Reset: Quick command to reset all GPG-related Git configurations
Before using GitKeyKit, ensure you have:
- Git installed and configured with user.name and user.email
- GPG (GnuPG) installed
- Windows: Install Gpg4win
- macOS:
brew install gnupg
- Linux:
sudo apt-get install gnupg
(Ubuntu/Debian) or equivalent
cd gitkeykit
sudo make install
gitkeykit
gitkeykit import <key_path>
gitkeykit --reset
make all
This will:
- Compile the source files from
src/
,src/commands/
, andsrc/utils/
directories - Link object files and create the executable in
bin/
directory - Create necessary directories (
build/
andbin/
) if they don't exist - Generate the executable
gitkeykit
(orgitkeykit.exe
on Windows)
make clean
This removes the build/
and bin/
directories along with all generated files.
Code | Description |
---|---|
0 | Success |
1 | GPG not found |
2 | Git not found |
3 | Invalid arguments |
4 | No secret keys found |
5 | Invalid input |
6 | Git configuration error |
7 | Key generation error |
8 | Key import error |
9 | Git configuration reset error |
10 | GPG configuration reset error |
11 | Home directory not found |