(originally asked "How can I use SSH pub/priv keys to authenticate via Invoke-WebRequest?")
I wanted to automate some housekeeping of my github repos, and (at least for learning) I thought I'd do it with Powershell. Is there a way to provide SSH private/public key pair to the Get-Credential (so I could use this), or straight to the Invoke-WebRequest cmdlet, to automate stuff authenticating to the Github API?
Or am I going the hard way and there is an easier way to do this (staying on the course of using the SSH keys)?