我一直在尝试使用PowerShell进行GitHub API的基本认证,但以下方法都无效:
> $cred = get-credential
# type username and password at prompt
> invoke-webrequest -uri https://api.github.com/user -credential $cred
Invoke-WebRequest : {
"message":"Requires authentication",
"documentation_url":"https://developer.github.com/v3"
}
我们如何使用PowerShell和GitHub Api进行基本身份验证?