-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
LFS doesn't detect credential helpers set on a url:
[credential "https://my-git-server.com/"]
helper = /path/to/helper
The problem is that LFS loads the cred helpers when an *lfsapi.Client is initialized:
Lines 69 to 72 in 3480fa4
| creds, err := getCredentialHelper(osEnv, gitEnv) | |
| if err != nil { | |
| return nil, errors.Wrap(err, "cannot find credential helper(s)") | |
| } |
Instead, it needs to happen at request time here, using *config.URLConfig:
Lines 23 to 27 in 3480fa4
| func (c *Client) DoWithAuth(remote string, req *http.Request) (*http.Response, error) { | |
| credHelper := c.Credentials | |
| if credHelper == nil { | |
| credHelper = defaultCredentialHelper | |
| } |