PHPackages                             afk11/git-deploy-key - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. afk11/git-deploy-key

ActiveApplication[DevOps &amp; Deployment](/categories/devops)

afk11/git-deploy-key
====================

Utility to manage multiple git deploy keys

v0.0.8(9y ago)018UnlicensePHP

Since May 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/afk11/git-deploy-key)[ Packagist](https://packagist.org/packages/afk11/git-deploy-key)[ RSS](/packages/afk11-git-deploy-key/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

Deploy key generator
====================

[](#deploy-key-generator)

This CLI application simplifies the process of generating deploy keys for git repositories.

Background
----------

[](#background)

Git allows users to authenticate using SSH public keys. While this is superior to password authentication, most users typically only use a single SSH key in their environment.

The ideal situation is to use a unique key for each repository and deployment, with entirely different keys being used to log into machines.

How it works
------------

[](#how-it-works)

This application generates an ECDSA key suitable for SSH. After creation, the key must be granted access on the remote git server. Github has a repository settings for this - users of Github will be directed to this page.

Keys are saved in the folder `~/.ssh/gitdeploy`. Each repository gets it's own entry in `~/.ssh/config`, specifying a name for the host, the user/domain/port, and the key file.

Keys are encrypted using the default SSH procedure (salted password, key derived through single pass of md5). PKCS#8 encoding is on the wishlist, as it enables stretching of encryption key material.

The tool supports unencrypted keys by setting the --no-password option.

Usage
-----

[](#usage)

### Install the tool:

[](#install-the-tool)

This tool is available through composer. The following command will save the application to the global composer directory (~/.composer)

```
composer global require afk11/git-deploy-key

```

Update your $PATH to include ~/.composer/vendor/bin:

```
echo "export PATH=~/.composer/vendor/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc # this is done automatically when you log in

```

At this point you can use the tool anywhere:

```
git-deploy-key help

```

You can also checkout this repository and access the executable in `bin/` directory after running `composer install`

### Create a password protected SSH key:

[](#create-a-password-protected-ssh-key)

Creating the key:

```
user@dev:~$ git-deploy-key create git@github.com:Bit-Wasp/bitcoin-php
Confirm details:
    [output trimmed]
Is this ok [y/n]: y
Password:
Password again:
You're using Github! You can paste the key in here: https://github.com/Bit-Wasp/bitcoin-php/settings/keys
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFz53QOkzt6ZPP1hnHY5iDqcGgLho2eZQe0h0SsAWwiwiGwT3bv6HRkKIeFeonWEH/j/QOpZee+5UyVBcMbM0Es= user@dev

Saved key to disk

```

Cloning the project:

```
user@dev:~/git$ git clone github-Bit-Wasp-bitcoin-php:Bit-Wasp/bitcoin-php
Cloning into 'bitcoin-php'...
Enter passphrase for key '/home/user/.ssh/gitdeploy/github-Bit-Wasp-bitcoin-php':
     [output trimmed]

```

### Custom names for sessions

[](#custom-names-for-sessions)

The default name for each session is made from the domain, organization, and repository. Custom names can be given by providing a second argument.

```
$ git-deploy-key create git@github.com:Bit-Wasp/bitcoin-php gitbitcoin
$ git clone gitbitcoin:Bit-Wasp/bitcoin-php

```

### Unprotected SSH key:

[](#unprotected-ssh-key)

The `--no-password` option can be set to disable encryption of the key. This can be useful during automated deployments with scheduled updates.

```
user@dev:~$ git-deploy-key create git@github.com:Bit-Wasp/bitcoin-p2p-php --no-password
Confirm details:

    Private key file: /home/user/.ssh/gitdeploy/github-Bit-Wasp-bitcoin-p2p-php
    Public key file: /home/user/.ssh/gitdeploy/github-Bit-Wasp-bitcoin-p2p-php.pub

The following config entry will be written:

Host github-Bit-Wasp-bitcoin-p2p-php
Hostname github.com
User git
Port 22
IdentityFile /home/user/.ssh/gitdeploy/github-Bit-Wasp-bitcoin-p2p-php

Is this ok [y/n]: y
You're using Github! You can paste the key in here: https://github.com/Bit-Wasp/bitcoin-p2p-php/settings/keys
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHfgRkFAO6Du+Drrl+viCa3PxZ51N3+SMxRj2kJ6AhN6XJifXTx39rJpbUGHpyKZQvyPC1/QQNtgShktOw0JPyw= user@dev

Saved key to disk

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~16 days

Total

8

Last Release

3593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/763cdc5cc50414bacd4ff1080eede79432f7c3cc26a3d8aa9031b1537a8bd734?d=identicon)[thomaskerin](/maintainers/thomaskerin)

---

Top Contributors

[![afk11](https://avatars.githubusercontent.com/u/5617245?v=4)](https://github.com/afk11 "afk11 (19 commits)")

---

Tags

sshgithubgitdeployECDSAphpecc

### Embed Badge

![Health badge](/badges/afk11-git-deploy-key/health.svg)

```
[![Health](https://phpackages.com/badges/afk11-git-deploy-key/health.svg)](https://phpackages.com/packages/afk11-git-deploy-key)
```

###  Alternatives

[banago/phploy

PHPloy - Incremental Git (S)FTP deployment tool that supports submodules, multiple servers and rollbacks.

1.4k47.2k](/packages/banago-phploy)[kohkimakimoto/altax

Altax is an extensible deployment tool for PHP.

2002.8k](/packages/kohkimakimoto-altax)[pomander/pomander

Deployment for PHP

19815.7k2](/packages/pomander-pomander)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
