No project description provided
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file git-ssh-key-0.1.5.tar.gz
.
File metadata
- Download URL: git-ssh-key-0.1.5.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4e72faf824fcabaf2637d02278928b72566e9ad4aed82de4e5db292435a64c |
|
MD5 | a53623a14b42798ed6829345357b8829 |
|
BLAKE2b-256 | c764675e6f2b35cc7763efc663e35d5c1f13fa1ec6b97cee62f7754f3d91427c |
File details
Details for the file git_ssh_key-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: git_ssh_key-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6cd880ed806eb5a1998c87a6e2bf684ba1fa7aad95c188c6bdf3ac0ffaf8b14 |
|
MD5 | 1070a03cadcc064a43d22ce3f32258bf |
|
BLAKE2b-256 | 5527f6835166941e030d44efa524f98e3f2a61cca8d48b86099d9127ce6f0421 |