Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

Git checkout is causing issue.

I am trying a build using Teamcity and code is being checked-out on my agent having ( Git client - git-1.7.1-9.el6_9.x86_64.rpm ) , but somehow it throws below error : 

The .git directory is missing in '/home/mtxuat/buildAgent/work/3907fc3ed9485d93'. Running 'git init'...
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git init
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git config core.sparseCheckout false
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git config http.sslCAInfo
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git show-ref
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git show-ref refs/remotes/origin/develop
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] Commit 'a516c3731da2a46bd5c4bc34441ece848812a0ed' is not found in local clone. Running 'git fetch'...
  • Agent time: 04:32:19
[05:32:19][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git fetch --progress origin +refs/heads/develop:refs/remotes/origin/develop (7s)
  • Agent time: 04:32:19
[05:32:27][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git log -n1 --pretty=format:%H%x20%s a516c3731da2a46bd5c4bc34441ece848812a0ed --
  • Agent time: 04:32:27
[05:32:27][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git branch
  • Agent time: 04:32:27
[05:32:27][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] /usr/libexec/git-core/git branch --create-reflog --track develop refs/remotes/origin/develop
  • Agent time: 04:32:27
[05:32:27][Update checkout directory (/home/mtxuat/buildAgent/work/3907fc3ed9485d93)] error: unknown option `create-reflog'
 
But on other agent which have same version of git , it is being executed successfully. Refer Below log 
 
The .git directory is missing in '/home/tcagent/buildAgent/work/3907fc3ed9485d93'. Running 'git init'...
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git init
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git config core.sparseCheckout true
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git config http.sslCAInfo
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git show-ref
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git show-ref refs/remotes/origin/develop
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] Commit 'a516c3731da2a46bd5c4bc34441ece848812a0ed' is not found in local clone. Running 'git fetch'...
  • Agent time: 06:37:43
[07:37:43][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git fetch --progress origin +refs/heads/develop:refs/remotes/origin/develop (1s)
  • Agent time: 06:37:43
[07:37:44][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git log -n1 --pretty=format:%H%x20%s a516c3731da2a46bd5c4bc34441ece848812a0ed --
  • Agent time: 06:37:44
[07:37:44][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git branch
  • Agent time: 06:37:44
[07:37:44][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git branch --create-reflog --track develop refs/remotes/origin/develop
  • Agent time: 06:37:44
[07:37:44][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git update-ref refs/heads/develop a516c3731da2a46bd5c4bc34441ece848812a0ed
  • Agent time: 06:37:44
[07:37:44][Update checkout directory (/home/tcagent/buildAgent/work/3907fc3ed9485d93)] /usr/bin/git checkout -q -f develop
 
1 Reply
Commander Lvl 3
Message 2 of 2

Re: Git checkout is causing issue.

Are you sure both environments are the same? Because the Git execution path seems different in both locations.


- Mark