git-ssh-key
manager multi git repo ssh keys in one machine, with multi private or public repo.
this command will auto generate the key and add it to your ssh config
usage
pip install git-ssh-key
run command with your repo link like
git-ssh-key https://github.com/alingse/git-ssh-key.git
it will print the new alias repo link and the new public key,
New repo address: git@github.com-f5851eb:alingse/git-ssh-key.git
New repo public rsa key: /Users/alingse/.ssh/github.com-f5851eb.id_rsa.pub
the public key has already been configured in your ssh config file, remember add it to repo's setting keys (https://github.com/user/repo/settings/keys)
and then just clone like this
git clone git@github.com-f5851eb:alingse/git-ssh-key.git
more options see
git-ssh-key --help
git-ssh-key -c git.ssh.config --keys ./../ -t web-backend git@github.com:alingse/git-ssh-key.git
How it work
I ever see some stackoverflow and github gist, and just make them a tool
git-ssh-key will read .ssh/config (default) and write into an alias host config.
like this
Host github.com-f5851eb
HostName github.com
User git
IdentityFile /Users/alingse/.ssh/github.com-f5851eb.id_rsa
the f5851eb is tag, default generate by hash(url)
Develop
pdm see https://pdm.fming.dev/
pdm install
pdm build
pdm run git-ssh-key --help
publish
add once
pdm config publish.username xxx
pdm config publish.password yyy
pdm publish
more TODO
- show public key ?
- add more test ?
- better giturlparse
Metadata
Release files for git-ssh-key 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git-ssh-key-0.1.5.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_ssh_key-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.8 kB
Release files / git-ssh-key-0.1.5.tar.gz
| Download URL | git-ssh-key-0.1.5.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df4e72faf824fcabaf2637d02278928b72566e9ad4aed82de4e5db292435a64c
|
|
BLAKE2b-256 checksum How to use checksums |
c764675e6f2b35cc7763efc663e35d5c1f13fa1ec6b97cee62f7754f3d91427c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Release files / git_ssh_key-0.1.5-py3-none-any.whl
| Download URL | git_ssh_key-0.1.5-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6cd880ed806eb5a1998c87a6e2bf684ba1fa7aad95c188c6bdf3ac0ffaf8b14
|
|
BLAKE2b-256 checksum How to use checksums |
5527f6835166941e030d44efa524f98e3f2a61cca8d48b86099d9127ce6f0421
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|