PSU - Github deploy keys

Product: PowerShell Universal
Version: 4.2.19


We have had some issues with getting PSU and Github deploy keys to work, and i wanted to share the simple steps we ended up with, in order for it to work.
Hopefully someone will find it useful. :slight_smile:

In the example here, i have used a docker container running version 4.2.19

  1. Connect to the docker container (docker exec -it pwsh)
  2. Execute the ssh-keygen command:
ssh-keygen -t ed25519 -C ""
  1. Fetch the public key, and insert into the Github repo:
cat /root/.ssh/
  1. Update the ssh config file:
"Host" | Out-file /root/.ssh/config -Append
"   HostName" | Out-file /root/.ssh/config -Append
"   IdentityFile /root/.ssh/id_ed25519" | Out-file /root/.ssh/config -Append
"   IdentitiesOnly yes" | Out-file /root/.ssh/config -Append
  1. Update the global variables for Git:
git config --global ""
git config --global "system user"
  1. Prevent ssh from prompting if you want to trust the ssh keys for Github:
ssh -o StrictHostKeyChecking=no
  1. Go the the PSU web interface, and perform a change so that the .universal folder is created - its a known bug. If the folder is not there, then PSU will fail to trigger Git properly - Adam is aware and will fix in an upcoming version.

  2. Setup Git like this:

  3. Done :slight_smile:

We will look into having this automated by a pipeline or such, to avoid all these manual steps.