Reputation: 866
(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)?
Upvotes: 0
Views: 925
Reputation: 866
Ok, as Martin pointed out in the comments:
Invoke-WebRequest
is for HTTP. SSH keys are not used with HTTP.
I was truly and honestly ignorant to that "detail" and thought it could be done.
After being pointed that, I've found this similar question, and with some more digging, I've found out that what I really need are developer tokens.
Upvotes: 1