Files
podi/recipe/sshkey
2022-02-09 13:11:08 +01:00

15 lines
501 B
Plaintext

# installation : run 'podmen recipe sshkey' or put this file into .podman folder
# example usage: ./podman init git@yourserver
on_init_server(){
trigger init_server:sshkey
local key=~/.ssh/id_rsa_${PM_APP}
test -f $key && {
ssh-keygen -t rsa -N "" -f $key
ssh-key-copy -p $PM_PORT -i $key $PM_USER@$PM_SERVER
}
print "Yay! now:"
print " 1. commit changes and type: 'git push $PM_SERVER $PM_BRANCH'"
print " 2. share key '~/.ssh/id_rsa_$PM_APP' to collaborate with devs "
}