【问题标题】:TFS Build agen failing to find .certifcate fileTFS 构建代理找不到 .certificate 文件
【发布时间】:2021-01-11 18:08:28
【问题描述】:
 1. 2020-09-18T19:03:37.9661852Z ##[debug]Evaluating condition for step:
    'Get Sources'
 2. 2020-09-18T19:03:37.9783485Z ##[debug]Evaluating: SucceededNode()
 3. 2020-09-18T19:03:37.9798521Z ##[debug]Evaluating SucceededNode:
 4. 2020-09-18T19:03:37.9848754Z ##[debug]=> True    
 5. 2020-09-18T19:03:37.9888404Z ##[debug]Result:
True 
 6. 2020-09-18T19:03:37.9971561Z ##[section]Starting: Get Sources    
 7. 2020-09-18T19:03:38.0033628Z ##[debug]Sync source for endpoint: DIAMONDS
 8. 2020-09-18T19:03:38.0470845Z Syncing repository: DIAMONDS (TfsGit)
 9. 2020-09-18T19:03:38.0560347Z Prepending Path environment variable
    with directory containing 'git.exe'.
 10. 2020-09-18T19:03:38.0571574Z ##[debug]Path:
     'C:\Agent\vsts-agent-win-x64-2.136.1\externals\git\cmd;C:\Program
     Files\Common Files\Oracle\Java\javapath;C:\Program Files
     (x86)\Common
     Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program
     Files (x86)\HID Global\ActivClient\;C:\Program Files\HID
     Global\ActivClient\;C:\Program Files\dotnet\;C:\Program
     Files\Microsoft SQL
     Server\130\Tools\Binn\;C:\Users\svc.dsms.vissvc.sa\AppData\Local\Microsoft\WindowsApps'
 11. 2020-09-18T19:03:38.0618801Z ##[debug]Get git version. 
 12. 2020-09-18T19:03:38.0659586Z ##[command]git version
 13. 2020-09-18T19:03:38.4081255Z git version 2.17.1.windows.2
 14. 2020-09-18T19:03:38.4111608Z ##[debug]Detect git version: 2.17.1.
 15. 2020-09-18T19:03:38.4204178Z ##[debug]Set git useragent to:
     git/2.17.1 (vsts-agent-git/2.136.1).
 16. 2020-09-18T19:03:38.4267175Z
     ##[debug]Checking if the repo on C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s matches the expected
     repository origin URL. expected Url: https://XXX 
 17. 2020-09-18T19:03:38.4320839Z ##[debug]Inspect remote.origin.url for
     repository under C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s
 18. 020-09-18T19:03:38.4321081Z ##[command]git config --get
     remote.origin.url
 19. 2020-09-18T19:03:38.7395942Z ##[debug]Get remote origin fetch url
     from git config: https:XXX
 20. 2020-09-18T19:03:38.7396356Z ##[debug]Repository remote origin
     fetch url is https://XXX 
 21. 2020-09-18T19:03:38.7396743Z ##[debug]URLs match.
 22. 2020-09-18T19:03:38.7431528Z ##[debug]Delete untracked 
     files/folders for repository at 
     C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s.
 23. 2020-09-18T19:03:38.7467645Z ##[command]git clean -fdx
 24. 2020-09-18T19:03:39.0583899Z ##[debug]Undo any changes to tracked
     files in the working tree for repository at
     C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s.
 25. 2020-09-18T19:03:39.0585957Z ##[command]git reset --hard HEAD
 26. 2020-09-18T19:03:39.2995536Z fatal: ambiguous argument 'HEAD':
     unknown revision or path not in the working tree. 
 27. 2020-09-18T19:03:39.3000326Z Use '--' to separate paths from
     revisions, like this: 
 28. 2020-09-18T19:03:39.3022533Z 'git <command> [<revision>...] --
     [<file>...]' 
 29. 2020-09-18T19:03:39.3195495Z
     ##[debug]'git reset --hard HEAD' failed with exit code 128 For 
 30. futher investigation, manually run 'git reset --hard HEAD' on repo
root: C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s after each
     build.
 31. 2020-09-18T19:03:39.3226184Z ##[warning]Unable to run "git clean 
     -fdx" and "git reset --hard HEAD" successfully, delete source folder instead.
 32. 2020-09-18T19:03:39.3415125Z ##[debug]Init git repository at:
     C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s.
 33. 2020-09-18T19:03:39.3415414Z ##[command]git init
     "C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s"
 34. 2020-09-18T19:03:39.8849476Z Initialized empty Git repository in
     C:/Agent/vsts-agent-win-x64-2.136.1/_work/2/s/.git/ 
 35. 2020-09-18T19:03:39.9152342Z ##[debug]Add git remote: origin to
     url: https://XXXfor repository under:
     C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s.
 36. 2020-09-18T19:03:39.9152668Z ##[command]git remote add origin
     https://XXX
 37. 2020-09-18T19:03:40.2769659Z ##[debug]Disable git auto garbage
     collection. 
 38. 2020-09-18T19:03:40.2769869Z ##[command]git config gc.auto 0
 39. 2020-09-18T19:03:40.5400860Z ##[debug]Checking git config
     http.https://XXX.extraheader exist or not
 40. 2020-09-18T19:03:40.5401139Z ##[command]git config --get-all
     http.https://XXX.extraheader 
 41. 2020-09-18T19:03:40.7805892Z
     ##[debug]Checking git config http.proxy exist or not
 42. 2020-09-18T19:03:40.7806064Z ##[command]git config --get-all
     http.proxy 
 43. 2020-09-18T19:03:41.0134148Z ##[debug]Fetch git
          repository at: C:\Agent\vsts-agent-win-x64-2.136.1\_work\2\s
          remote: origin. 
 44. 2020-09-18T19:03:41.0174569Z ##[command]git -c 
     http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune 
     --progress --no-recurse-submodules origin
 45. 2020-09-18T19:03:41.5941543Z fatal: unable to access 'https://XXX':
     error setting certificate verify locations: 
 46. 2020-09-18T19:03:41.5958389Z   CAfile: C:/Program
     Files/Git/mingw64/ssl/certs/ca-bundle.crt
 47. 2020-09-18T19:03:41.5958752Z   CApath: none
 48. 2020-09-18T19:03:41.6419509Z ##[error]Git fetch failed with exit
     code: 128 
 49. 2020-09-18T19:03:41.6467215Z
 50. ##[debug]System.InvalidOperationException: Git fetch failed with exit code: 128

   

at Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.<GetSourceAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildJobExtension.<GetSourceAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Services.Agent.Worker.JobExtensionRunner.<RunAsync>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunStepAsync>d__1.MoveNext() 2020-09-18T19:03:41.6475180Z ##[section]Finishing: Get Sources

【问题讨论】:

  • 你好朋友,这个问题有更新吗?如果您仍然被阻止,请随时告诉我,我会尽力提供帮助:)
  • thx 仍有问题将在今天和明天尝试解决

标签: tfs azure-pipelines tfsbuild


【解决方案1】:

请尝试以下方法:

  1. 在“C:/Program Files/Git”文件夹中查找 ca-bundle.crt。如果找到此文件,请将其复制并粘贴到“C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt”。

  2. 修复“C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt”的路径

    git config --system http.sslcainfo "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt"

  3. 通过执行完全关闭所有 SSL 检查:

    git config --system http.sslverify false

由于您在结帐步骤中遇到此问题,您可以使用

steps:
- checkout: none

首先禁用结帐步骤。 上述命令完成后,在你的任务中使用 git checkout 命令签出你的仓库。

更多详情请参考这张票:Github: error cloning my private repository

【讨论】:

  • 今天或明天试试
猜你喜欢
  • 2019-11-24
  • 1970-01-01
  • 2019-07-09
  • 2019-07-01
  • 1970-01-01
  • 2015-08-22
  • 2014-03-08
  • 2016-05-18
  • 1970-01-01
相关资源
最近更新 更多