Skip to content

Instantly share code, notes, and snippets.

@joshjohanning
Created June 19, 2023 20:04
Show Gist options
  • Save joshjohanning/a25806021c1a1089cba31a522aa92826 to your computer and use it in GitHub Desktop.
Save joshjohanning/a25806021c1a1089cba31a522aa92826 to your computer and use it in GitHub Desktop.
Using SSH Agent with GitHub's backup-utils
eval "$(ssh-agent -s)"
pass=$(az keyvault secret show --vault-name josh-key-vault-test --name passphrase --query value -o tsv)
# sudo yum install -y expect
expect << EOF
spawn ssh-add /home/codespace/.ssh/id_rsa
expect "Enter passphrase"
send "$pass\r"
expect eof
EOF
./github-backup-utils-v3.8.0/bin/ghe-backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment