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
pip install git-ssh-keyrun command with your repo link like
git-ssh-key https://github.com/alingse/git-ssh-key.gitit 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.pubthe 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.gitmore options see
git-ssh-key --helpgit-ssh-key -c git.ssh.config --keys ./../ -t web-backend git@github.com:alingse/git-ssh-key.gitI 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)
pdm see https://pdm.fming.dev/
pdm install
pdm build
pdm run git-ssh-key --helpadd once
pdm config publish.username xxx
pdm config publish.password yyypdm publish- show public key ?
- add more test ?
- better giturlparse