Oktokit.Net не может создать соединение TLS
Я написал небольшой тестовый пример, чтобы изолировать ошибки авторизации github api, которые мы получаем. Соответствующий код ниже.
let private authToken = "XX REDACTED XX"
let product: Product.ProductInfo =
{
GitHubProjectOwner = "Weingartner"
GitHubProjectName = "automation-test"
}
let testAuth owner project =
async {
let client = GitHubClient(ProductHeaderValue "WeingartnerDistribution")
client.Credentials <- Credentials authToken
let! user = client.User.Current() |> Async.AwaitTask
return user <> null
}
[<Fact>]
member x.``Should be able to authenticate with github``() =
async {
let owner = product.GitHubProjectOwner
let project = product.GitHubProjectName
let! client = GitHubIssue.testAuth owner project
test <@ client @>
}
|> Async.StartAsTask
Authtoken от пользователя, который был добавлен с возможностью чтения / записи в хранилище, и Authtoken только для репо
Я получаю следующую трассировку стека
System.AggregateException
One or more errors occurred.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xunit.Sdk.ExecutionTimer.<AggregateAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xunit.Sdk.ExceptionAggregator.<RunAsync>d__9.MoveNext()
System.Net.Http.HttpRequestException
An error occurred while sending the request.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octokit.Internal.HttpClientAdapter.<SendAsync>d__10.MoveNext() in D:\repos\octokit.net\Octokit\Http\HttpClientAdapter.cs:line 180
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octokit.Internal.HttpClientAdapter.<Send>d__3.MoveNext() in D:\repos\octokit.net\Octokit\Http\HttpClientAdapter.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octokit.Connection.<RunRequest>d__55.MoveNext() in D:\repos\octokit.net\Octokit\Http\Connection.cs:line 582
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octokit.Connection.<Run>d__54`1.MoveNext() in D:\repos\octokit.net\Octokit\Http\Connection.cs:line 573
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octokit.ApiConnection.<Get>d__8`1.MoveNext() in D:\repos\octokit.net\Octokit\Http\ApiConnection.cs:line 0
System.Net.WebException
The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
Я уверен, что все правильно. Есть идеи, почему я не могу подключиться? Краткое изложение ошибки
Не удалось создать безопасный канал SSL/TLS.