diff --git a/lfs/credentials.go b/lfs/credentials.go
index <HASH>..<HASH> 100644
--- a/lfs/credentials.go
+++ b/lfs/credentials.go
@@ -17,7 +17,8 @@ type credentialFunc func(Creds, string) (credentialFetcher, error)
 var execCreds credentialFunc
 
 func credentials(u *url.URL) (Creds, error) {
-	creds := Creds{"protocol": u.Scheme, "host": u.Host, "path": u.Path}
+	path := strings.TrimPrefix(u.Path, "/")
+	creds := Creds{"protocol": u.Scheme, "host": u.Host, "path": path}
 	cmd, err := execCreds(creds, "fill")
 	if err != nil {
 		return nil, err
Trim leading slash from the path passed to credential fill