git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: strange git delays

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 20, 2008, 21:53 UTC
Message-ID
<alpine.LFD.1.00.0803201441270.3020@woody.linux-foundation.org>
In-Reply-To
<1206019968.27619.26.camel@localhost>
On Fri, 21 Mar 2008, James Utter wrote:
Show 9 quoted lines
>
> james@timesink:~/testgit$ time git commit --message "initial commit"
> Created initial commit 4f4b3a3: initial commit
>  1 files changed, 1 insertions(+), 0 deletions(-)
>  create mode 100644 hello
> 
> real	0m10.008s
> user	0m0.000s
> sys	0m0.008s
Ok, that is almost exactly 10 seconds longer than it should take.

And I can almost guarantee that it's something like a problem looking up your hostname or perhaps user identity - I would guess you have some name service problem.

Do an
	strace -tT git commit --message "initial commit"

on that git commit to make sure, but I would almost bet that it's when git does tget "getpwuid()" thing to get your name from the gecos fields, and you have some setup problem with nscd o similar.

It might just go away if you set up your user name and email manually, ie try doing

	git config --global user.name "James Utter"
	git config --global user.email james.utter@gmail.com

and see if that makes the delay go away. It probably tries to look up your login info from some non-existent NIS setup, and then times out after ten seconds and picks the data from your /etc/passwd file instead.

(There can be other things that do similar things - misconfigured name servers etc can cause delay etc. So maybe I'm wrogn on blaming nscd, but it would be my first guess).

		Linus
Previous: Johannes Schindelin
Message 4 of 4 in “strange git delays”
  1. James UtterMar 20, 2008
  2. Johannes SixtMar 20, 2008
  3. Johannes SchindelinMar 20, 2008
  4. Linus TorvaldsMar 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.