Skip to content
/ gdkg Public

Go Deploy Key Gen - Secure deploy key generator built with Go

License

Notifications You must be signed in to change notification settings

GaboCapo/gdkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image

🔐 gdkg - Go Deploy Key Generator

gdkg is a lightweight Go CLI tool for securely generating, managing, and revoking SSH Deploy Keys for GitHub repositories. It automates deploy key workflows and ensures a clean, secure setup.


✨ Features

  • ✅ Generate SSH deploy keys with a single command
  • 🔁 Cleanly revoke deploy keys (including SSH config cleanup)
  • 🔒 Uses modern ed25519 keys
  • 🧰 CLI mode and interactive TUI
  • 📦 Small, portable binary with no dependencies
  • ⚙️ Compatible with CI/CD pipelines and personal projects

Bonus 🎁

Claude Code Trigger, you can have Claude Code create the deploy key for you so that you only have to add it to gihtub. Use a prompt to do this and adjust these {fields}. {Apps}= The folder where you saved the gdkg binary application. {git@github.com:UserName/AppName.git} = Change it so that your user and app name are correct.

Example of initialising an empty repository:

The next step is to initialise the repository. We have a special tool called gdkg that can be used to generate deploys. Look for it in the {Apps} folder. It should be there. Run it, create a deploy, give it to me, and I'll let you know when I've added it. You can already prepare everything.
I've already created a repository on GitHub at {git@github.com:UserName/AppName.git}. It's completely empty and now needs to be initialised. Give me the deploy key first.

⚠️ Be aware that when you use it like that, this means the deploy key is transmitted via the LLM provider! : Do not use it in critical projects; instead, create the deploy key manually if you want to be sure.


📦 Installation / Run

From source (if you want to develop or test it)

Requires Go 1.20

git clone https://github.com/GaboCapo/gdkg.git
cd gdkg
./build.sh

Binary will be available as ./gdkg.

Run from Releases (if you want to use it right away without development)

Download the appropriate binary for your platform from the Releases section and place it in a directory of your choice.

Note: This is a console-based CLI tool and must be executed from a terminal or command prompt. Double-clicking will not work.

Example (Linux):

  1. Make the binary executable:
chmod +x gdkg-v1.0.0-linux-amd64
  1. Run the application via terminal:
./gdkg-v1.0.0-linux-amd64
  1. Console output will look like this:
=== GitHub Deploy Key Generator ===
1: Generate deploy key
2: Remove deploy key
3: Quit
Please select an option:

🚀 Usage

Interactive mode

./gdkg

Menu guides you through:

  • [1] Generate new deploy key
  • [2] Revoke existing key
  • [3] Exit

📁 File structure

Default storage: ~/.ssh/gdkg

~/.ssh/gdkg/
├── config                   # SSH config file with host entries
├── my-repo_deploy-key       # Private key
└── my-repo_deploy-key.pub   # Public key (for GitHub)

config updates automatically on key creation.


🔐 Security

  • Ed25519 keys
  • Deploy keys separated from main SSH folder
  • SSH config only updated with necessary entries
  • No data sent externally

📜 License

MIT License © GaboCapo


🧠 Credits

Built to automate GitOps workflows no manual copy-paste needed.

🔐 This repo is pushed with a deploy key generated by this tool

Made with ❤️ in Go.

About

Go Deploy Key Gen - Secure deploy key generator built with Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published