fixup! http: call the credentials callback when facing a 401

This commit is contained in:
Carlos Martín Nieto 2017-05-20 17:38:07 +02:00 committed by Carlos Martín Nieto
parent 1339ad1e71
commit 2aa2ae5150
1 changed files with 3 additions and 0 deletions

View File

@ -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 {