add tracer messages when creds are filled or not found
This commit is contained in:
parent
02b89e3830
commit
09aff9efc9
@ -7,6 +7,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/github/git-lfs/vendor/_nuts/github.com/rubyist/tracerx"
|
||||||
)
|
)
|
||||||
|
|
||||||
// getCreds gets the credentials for the given request's URL, and sets its
|
// getCreds gets the credentials for the given request's URL, and sets its
|
||||||
@ -108,10 +110,14 @@ func fillCredentials(req *http.Request, u *url.URL) (Creds, error) {
|
|||||||
|
|
||||||
creds, err := execCreds(input, "fill")
|
creds, err := execCreds(input, "fill")
|
||||||
|
|
||||||
if creds != nil && err == nil {
|
if err != nil || creds == nil || len(creds) < 1 {
|
||||||
setRequestAuth(req, creds["username"], creds["password"])
|
tracerx.Printf("No credentials for %s", u)
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracerx.Printf("Filled credentials for %s", u)
|
||||||
|
setRequestAuth(req, creds["username"], creds["password"])
|
||||||
|
|
||||||
return creds, err
|
return creds, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user