-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
The shell integration tests pass its custom git config values to a git clone through the GIT_CONFIG environment variable. One of the custom values is a credential.helper setting to a test-only credential helper that generates a username and password for any "127.0.0.1:PORT" git servers. This config is meant to be applied to test repos only.
As diagnosed here, it seems this isn't working with a git clone.
$ GIT_CONFIG=path/to/config git clone- Git runs fetch internally.
- As Git checks the files out, it calls
git lfs smudgeon each file. - before downloading, Git LFS calls
git credential.
It seems that the custom GIT_CONFIG is being dropped somewhere after step 2. I did try adding this to the commands/commands_smudge.go to see if Git is passing GIT_CONFIG:
++ out='Cloning into '\''clone'\''...
panic: GIT_CONFIG ENV /Users/rick/github/git-lfs/test/remote/config-test-happy-path
So it looks like it's getting the value from Git properly.
A couple places to check:
- The git config loading code always runs
git config -l. Instead, it should probably recognizeGIT_CONFIGand use that. - The git credential code builds a
*os.Cmdwithout specifying the Env. The docs say that it should be passing the current process' env through, so in theory this should work.
Reactions are currently unavailable