Skip to main content

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

  1. show public key ?
  2. add more test ?
  3. better giturlparse

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-ssh-key-0.1.5.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

git_ssh_key-0.1.5-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page