diff --git a/lfs/credentials.go b/lfs/credentials.go
index <HASH>..<HASH> 100644
--- a/lfs/credentials.go
+++ b/lfs/credentials.go
@@ -105,6 +105,9 @@ func getCredURLForAPI(req *http.Request) (*url.URL, error) {
 func fillCredentials(u *url.URL) (Creds, error) {
 	path := strings.TrimPrefix(u.Path, "/")
 	creds := Creds{"protocol": u.Scheme, "host": u.Host, "path": path}
+	if u.User != nil && u.User.Username() != "" {
+		creds["username"] = u.User.Username()
+	}
 	return execCreds(creds, "fill")
 }
Include the username in the creds call if present

This is needed to disambiguate cases where a user has multiple usernames
on the same host. Without this the first item will be silently used
which might be wrong & cause a loop of incorrect password prompts (&
possibly a lockout on the server)