Skip to content

Instantly share code, notes, and snippets.

View filippo-orru's full-sized avatar
🇪🇺

Filippo Orrù filippo-orru

🇪🇺
View GitHub Profile
@filippo-orru
filippo-orru / generateDeployKey.sh
Created September 18, 2023 04:19
Script to generate a deploy key, save it to the user's .ssh folder and config. It echoes the public key to copy-paste to Github and the command to pull this repo.
#!/bin/sh
# Taken from: https://stackoverflow.com/a/68706187/11212830
# This script generates a ssh key for a single repository
# and adds a custom configuration to the users (not global) ssh config file,
# and outputs the public key for you to copy and paste as the repo deploy key
# and outputs the url for you to clone the repo on the machine.
# Github docs ref:
# https://docs.github.com/en/developers/overview/managing-deploy-keys#using-multiple-repositories-on-one-server
#