fixup! http: call the credentials callback when facing a 401
This commit is contained in:
parent
1339ad1e71
commit
2aa2ae5150
3
http.go
3
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 {
|
||||
|
|
Loading…
Reference in New Issue