0

(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)?

1
  • 2
    Invoke-WebRequest is for HTTP. SSH keys are not used with HTTP. Commented Jun 15, 2020 at 7:44

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.