Frequent errors running TFS-2013 with git

We have TFS-2013 configured to use a git repository. All works fine most of the time but we are getting intermittent build errors – they even seem to become more frequent over time.

This is what we can find in the build logs when the problem occurs:

  • not able to install gems
  • how to set desired language in git-gui?
  • Fatal error : no such path “file path” exist in commit id
  • git svn clone not checking out all directories
  • Microsoft Visual Studio Tools for git push error
  • Git log of all branchs in only the current tree
  • Exception Message: An error was raised by libgit2. Category = Os
    (Error).

    Could not remove directory. File
    ‘C:/Builds/1/MyTool/MyTool_CI/src/.git/objects/pack/pack_git2_a02380’
    cannot be removed: The process cannot access the file because it is
    being used by another process.

    (type LibGit2SharpException)

    Exception Data Dictionary:

    libgit2.code = -1

    libgit2.category = 1

    What could cause these errors..?

  • git-instaweb and git-clone
  • Git repository on S3 (as “origin”, not as backup)
  • still being prompted for credentials after installing credential-osxkeychain
  • Bitbucket is alarming that my git repo is too large but I cannot confirm large files
  • Git Change User
  • Ordering of git-rev-list
  • 2 Solutions collect form web for “Frequent errors running TFS-2013 with git”

    This seems to be a bug in progress, as seen by this thread:

    Can you repaire your VS2013 RTM and try again? Also, you can can see event viewer to see if there any useful info or have a try on other machines as I mentioned above.

    I noticed that when the issue happens, Process Explorer shows the open file handles from TFSBuildServiceHost. Restarting the service appears to be a workaround.

    We never had this issue before we introduced several builds for different branches within one repository. Then one day the build failed with exception:

    Exception Message: Attempted to access an unloaded AppDomain. (type AppDomainUnloadedException)
    Exception Stack Trace: 
    Server stack trace: 
    at LibGit2Sharp.Core.NativeMethods.git_clone(RepositorySafeHandle& repo, String origin_url, FilePath workdir_path, GitCloneOptions& opts)
    at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)
    at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)
    at Microsoft.TeamFoundation.Build.Activities.Git.GitPull.GitClone.GetRepository(String repositoryUrl, String workingFolder, Boolean checkoutSubmodules)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    

    After this the issue started appearing from time to time until I restarted TfsBuildServiceHost. TFS 2013 U4.

    Git Baby is a git and github fan, let's start git clone.