Git-Credential-Manager-for-Windows icon indicating copy to clipboard operation
Git-Credential-Manager-for-Windows copied to clipboard

I am using Gerrit and my Git Push“git push” and Pull“git pull” are very slow

Open AshishKalra07 opened this issue 6 years ago • 9 comments

I am using Gerrit and my Git Pushgit push and Pullgit pull are very slow.

When iI did a trace of git pullgit pull the "git credential manager get "git credential manager get is taking a lot of time. I

I am using LDAP authentication. Could anyone please help me what this step exactly do?

Attached is the scrrenshot of time taken.enter image description here. gerrit_test

AshishKalra07 avatar May 15 '19 14:05 AshishKalra07

Please try setting GCM_TRACE=1, redacting any personal info, and post the log

jeschu1 avatar May 15 '19 14:05 jeschu1

GCM_TRACE

@jeschu1 : Please find attached the requested details. It takes time while Querying .

AshishKalra07 avatar May 20 '19 13:05 AshishKalra07

@AshishKalra07 , can you please include the full log (full text to the right). It looks like the text is being cut off.

jeschu1 avatar May 20 '19 13:05 jeschu1

@jeschu1 : That's having confidential data.

AshishKalra07 avatar May 20 '19 13:05 AshishKalra07

@AshishKalra07 , can you elaborate on where GCM is slow?

From what I can see GCM called twice and in each time start and stop on the same second counter (35 / 57).

jeschu1 avatar May 20 '19 13:05 jeschu1

okay @jeschu1 What could be the possible cause? Is it not able to Query the creds and get timed out?

AshishKalra07 avatar May 20 '19 14:05 AshishKalra07

Try adding GIT_TRACE=1 and see if you can tell where the time is spent.

That will show you what Git is doing and may help point to an issue.

It would be helpful to see more of the log as well. This would require some blanking out of the log like you suggest to remove confidential info.

jeschu1 avatar May 20 '19 14:05 jeschu1

@jeschu1 : PFB the logs.

GIT_TRACE=1 GCM_TRACE=1 git pull 12:49:38.661125 git.c:344 trace: built-in: git pull 12:49:38.697768 run-command.c:640 trace: run_command: git fetch --update-head-ok 12:49:38.735157 git.c:344 trace: built-in: git fetch --update-head-ok 12:49:38.813282 run-command.c:640 trace: run_command: git remote-https origin 12:49:38.860158 git.c:576 trace: exec: git-remote-https origin 12:49:38.860158 run-command.c:640 trace: run_command: git-remote-https origin 12:49:39.114440 run-command.c:640 trace: run_command: 'git credential-manager get' 12:49:39.234337 git.c:576 trace: exec: git-credential-manager get 12:49:39.234337 run-command.c:640 trace: run_command: git-credential-manager get 12:49:39.359337 ...\Common.cs:636 trace: [Main] git-credential-manager (v1.15.2) 'get' 12:49:39.432928 ...\Where.cs:236 trace: [FindGitInstallations] found 1 Git installation(s). 12:49:39.442931 ...Configuration.cs:218 trace: [LoadGitConfiguration] git All config read, 33 entries. 12:49:39.444929 ...\Where.cs:236 trace: [FindGitInstallations] found 1 Git installation(s). 12:49:39.447932 ...Configuration.cs:218 trace: [LoadGitConfiguration] git All config read, 33 entries. 12:49:39.453930 ...\Common.cs:505 trace: [LoadOperationArguments] httpProxy =<proxy_url> 12:49:39.453930 ...tionArguments.cs:424 trace: [SetProxy] successfully set proxy to <proxy_url> 12:49:39.473725 ...\Common.cs:80 trace: [CreateAuthentication] detecting authority type for 12:49:39.489350 ...uthentication.cs:135 trace: [GetAuthentication] not github.com, authentication creation aborted. 12:49:39.489350 ...\Common.cs:178 trace: [CreateAuthentication] authority for is basic with NTLM=Auto. 12:49:39.489350 ...seSecureStore.cs:138 trace: [ReadCredentials] credentials for read from store. 12:49:39.489350 ...\Common.cs:673 trace: [QueryCredentials] credentials found.

12:53:54.038251 run-command.c:640 trace: run_command: 'git credential-manager store' 12:53:54.163259 git.c:576 trace: exec: git-credential-manager store 12:53:54.163259 run-command.c:640 trace: run_command: git-credential-manager store 12:53:54.282114 ...\Common.cs:636 trace: [Main] git-credential-manager (v1.15.2) 'store' 12:53:54.360549 ...\Where.cs:236 trace: [FindGitInstallations] found 1 Git installation(s). 12:53:54.375866 ...Configuration.cs:218 trace: [LoadGitConfiguration] git All config read, 33 entries. 12:53:54.375866 ...\Where.cs:236 trace: [FindGitInstallations] found 1 Git installation(s). 12:53:54.375866 ...Configuration.cs:218 trace: [LoadGitConfiguration] git All config read, 33 entries. 12:53:54.375866 ...\Common.cs:505 trace: [LoadOperationArguments] httpProxy = <proxy_url> 12:53:54.375866 ...tionArguments.cs:424 trace: [SetProxy] successfully set proxy to <proxy_url> 12:53:54.406861 ...\Common.cs:80 trace: [CreateAuthentication] detecting authority type for 12:53:54.420861 ...uthentication.cs:135 trace: [GetAuthentication] not github.com, authentication creation aborted. 12:53:54.420861 ...\Common.cs:178 trace: [CreateAuthentication] authority for is basic with NTLM=Auto. 12:53:54.420861 ...\Program.cs:407 trace: [Store] storing basic credentials for . 12:53:54.432864 ...seSecureStore.cs:232 trace: [WriteCredential] credentials for '<>written to store. 12:53:54.548714 run-command.c:640 trace: run_command: git rev-list --objects --stdin --not --all --quiet 12:53:54.703788 run-command.c:640 trace: run_command: git rev-list --objects --stdin --not --all --quiet 12:53:54.750653 git.c:344 trace: built-in: git rev-list --objects --stdin --not --all --quiet From

AshishKalra07 avatar May 23 '19 15:05 AshishKalra07

12:49:39.489350 ...\Common.cs:673 trace: [QueryCredentials] credentials found. 12:53:54.038251 run-command.c:640 trace: run_command: 'git credential-manager store'

There is 4+ minute break between between the above two calls. During the break I'd expect we'd be in 'git' to not GCM. That is interesting.

Have you tried the same command on the latest version of git/gcm? The version you are running for gcm is quite old.

jeschu1 avatar May 28 '19 12:05 jeschu1