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"
|
||||
"os/exec"
|
||||
"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
|
||||
@ -108,10 +110,14 @@ func fillCredentials(req *http.Request, u *url.URL) (Creds, error) {
|
||||
|
||||
creds, err := execCreds(input, "fill")
|
||||
|
||||
if creds != nil && err == nil {
|
||||
setRequestAuth(req, creds["username"], creds["password"])
|
||||
if err != nil || creds == nil || len(creds) < 1 {
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user