From 2aa2ae51504f2bb97ef68d36dc47d5cbe13d8907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 20 May 2017 17:38:07 +0200 Subject: [PATCH] fixup! http: call the credentials callback when facing a 401 --- http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http.go b/http.go index 275ab91..340433c 100644 --- a/http.go +++ b/http.go @@ -208,6 +208,9 @@ func (self *ManagedHttpStream) sendRequest() error { if resp.StatusCode == http.StatusUnauthorized { resp.Body.Close() var cred *C.git_cred + + runtime.LockOSThread() + defer runtime.UnlockOSThread() ret := C.git_transport_smart_credentials(&cred, self.owner.owner, nil, C.GIT_CREDTYPE_USERPASS_PLAINTEXT) if ret != 0 {