Build error syncing files from mercurial subrepository after the latest builds

Hi guys I've updated my continua ci version and it starts to thrown the follow error on my builds:

An error occurred while syncing files from the server to the agent. Details: Exception: ProcessException
Message: Running C:\Program Files\VSoft Technologies\ContinuaCI Agent\hg\hg.exe with arguments "archive -r 7877dc8cb06b5ffb509189d24653fee83bb24a58 -X "re:(?i)^(\._Continua_CI_empty_changeset_marker)$" -X "re:(?i)^(\._Continua_CI_file_hash_dictionary)$" --subrepos --config ui.archivemeta=false -R C:\HQBuild_WS\Repos\bb9f7198 C:\HQBuild_WS\Ws\30402\Source\ERx --config ui.username=Continua --noninteractive --encoding cp1252" on agent failed with return code 255 and error output: "abort: could not find web.cacerts: C:\Program Files\Mercurial\hgrc.d\cacert.pem (in subrepo Global)
"
Stack Trace: em Continua.Shared.Utils.Mercurial.Run(ProcessArguments args, String workingFolder, Func`2 checkResult, Boolean runRecoverIfRequired, Boolean allowTermination, Nullable`1 timeoutInSecs) em Continua.Shared.Utils.Mercurial.Archive(String repository, String destination, String revision, IEnumerable`1 includes, IEnumerable`1 excludes, Boolean listFiles) em Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.<>c__DisplayClass20_0.b__0() em Continua.Shared.Utils.ReadWriteLockList`1.WithReadLock(TId id, CancellationTokenSource cancelTokenSource, Action action) em Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.Export(String dest, String revision, String include, IEnumerable`1 excludes, Boolean listFiles) em Continua.Modules.Builds.Agent.AgentRepositoryHelper.CopySourceToWorkspace(String filePattern, IEnumerable`1 excludes, String relativeDestination, AgentWorkspaceSyncContext wsCtx, Boolean logRepoFiles, TransportContextDTO transportContext) em Continua.Modules.Builds.Agent.AgentBuildHelper.SyncSourceFromServer(IEnumerable`1 rules, AgentWorkspaceSyncContext workspaceCtx) em Continua.Modules.Builds.Agent.AgentBuildHelper.InitialiseWorkspaceOnAgent(IAgentCallbackProxy proxy, TransportContextDTO source, Guid callId)

I've tryed to create the mercurial folder buy hand and copy the hgrc.d from tortoise to it, but the error keep happening.

Any tips on how to fixe it ?

Best Regards,

Diego Garcia

Just to report Ive seen that the cacert.pem didnt exists at the folder. <br> <br> So Ive downloaded from https://curl.haxx.se/docs/caextract.html and save it and the build passsed, but i think this should be seen as the main repository this didnt happen.

Best Regards,
Diego Garcia

Hi Diego,

Can you check the file "%ProgramFiles%\VSoft Technologies\ContinuaCI Agent\hg\Mercurial.ini" contains a "cacerts" entry? e.g.

[web]cacerts=C:\Program Files\VSoft Technologies\ContinuaCI Agent\hg\hgrc.d\cacert.pem

and that the file "%ProgramFiles%\VSoft Technologies\ContinuaCI Agent\hg\hgrc.d\cacert.pem" exists?

It is possible that this is being overridden by a setting in the subrepository which is pointing to "C:\Program Files\Mercurial\hgrc.d\cacert.pem". Mercurial reads its settings from a number of files in the following order.

  1. /.hg/hgrc (per-repository)
  2. %USERPROFILE%\.hgrc (per-user)
  3. %USERPROFILE%\Mercurial.ini (per-user)
  4. %HOME%\.hgrc (per-user)
  5. %HOME%\Mercurial.ini (per-user)
  6. HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial (per-installation)
  7. \hgrc.d\*.rc (per-installation)
  8. \Mercurial.ini (per-installation)
  9. /default.d/*.rc (defaults)

Can you check each of these and let us know which ones contain a cacert entry? We suspect that the setting is overridden in the /.hg/hgrc file in the working folder of your subrepository. We'll look into whether we can do something to override this on the command line.