Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: failures in "configure" subcommand #161

Closed
derrickstolee opened this issue Sep 9, 2020 · 1 comment · Fixed by #163
Closed

Linux: failures in "configure" subcommand #161

derrickstolee opened this issue Sep 9, 2020 · 1 comment · Fixed by #163
Assignees
Labels
bug A bug in Git Credential Manager platform:linux Specific to a Linux-based platform

Comments

@derrickstolee
Copy link
Contributor

I was testing GCM Core on my Linux machine, when I ran into a couple errors:

stolee@stolee-linux-metal:/_git/office/src$ GCM_TRACE=1 git-credential-manager-core configure
13:04:35.696346 ...er/Application.cs:69 trace: [RunInternalAsync] Git Credential Manager version 2.0.214-beta+2e9919d0b8 (Linux, .NET Core 3.1.7) 'configure'
13:04:35.719149 ...rationService.cs:124 trace: [RunAsync] Configuring component 'Git Credential Manager'...
Configuring component 'Git Credential Manager'...
fatal: Index was outside the bounds of the array.

stolee@stolee-linux-metal:/_git/office/src$ git config --unset credential.helper

stolee@stolee-linux-metal:/_git/office/src$ GCM_TRACE=1 git-credential-manager-core configure
13:04:57.168842 ...er/Application.cs:69 trace: [RunInternalAsync] Git Credential Manager version 2.0.214-beta+2e9919d0b8 (Linux, .NET Core 3.1.7) 'configure'
13:04:57.192033 ...rationService.cs:124 trace: [RunAsync] Configuring component 'Git Credential Manager'...
Configuring component 'Git Credential Manager'...
fatal: Failed to get Git configuration multi-valued entry 'credential.helper' with value regex '.*'. Exit code '1' (level=All)
@derrickstolee derrickstolee added bug A bug in Git Credential Manager platform:linux Specific to a Linux-based platform labels Sep 9, 2020
@derrickstolee derrickstolee self-assigned this Sep 9, 2020
@derrickstolee
Copy link
Contributor Author

For the index out-of-bounds, I found this stack trace:

Index was outside the bounds of the array.
   at Microsoft.Git.CredentialManager.GitProcessConfiguration.GetRegex(String nameRegex, String valueRegex)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Git.CredentialManager.Application.Microsoft.Git.CredentialManager.IConfigurableComponent.ConfigureAsync(IEnvironment environment, EnvironmentVariableTarget environmentTarget, IGit git, GitConfigurationLevel configurationLevel) in /_scratch/gcm-core/src/shared/Microsoft.Git.CredentialManager/Application.cs:line 179
   at Microsoft.Git.CredentialManager.ConfigurationService.RunAsync(ConfigurationTarget target, Boolean configure) in /_scratch/gcm-core/src/shared/Microsoft.Git.CredentialManager/ConfigurationService.cs:line 127

derrickstolee added a commit that referenced this issue Sep 11, 2020
… configure' with empty config

Resolves #161. The failures were due to subtleties when working without any `credential.helper` values in any level of config. This is typical for a fresh install on a Linux machine, but never happens with Git for Windows. Git on macOS might also come pre-loaded with this config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in Git Credential Manager platform:linux Specific to a Linux-based platform
Projects
None yet
1 participant