无法从其他项目签出 repos

Posted

技术标签:

【中文标题】无法从其他项目签出 repos【英文标题】:Unable to checkout repos from other project 【发布时间】:2020-08-28 10:17:39 【问题描述】:

我很难将当前的发布管道重构为 yaml 管道。该管道使用当前存储库和来自另一个项目的另外两个存储库来生成必要的结构来构建所需的 docker 映像。管道在从另一个项目签出第一个 repo 的第一步失败时出现错误:

remote: TF401019: The Git repository with name or identifier my_repo_name does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'my_repo_name' not found
##[error]Git fetch failed with exit code: 128

此错误在 Azure DevOps 文档中有详细记录: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#q--a

我能够按照说明正确地将用户 current_project_name 构建服务 (org_name) (之前存在,我没有创建它)添加到我的另一个项目到具有必要创建标签、读取访问权限但但它总是再次失败。

在互联网上与该问题相关的快速搜索发现其他能够使用类似方法解决问题的人,来自 developercommunity.visualstudio.com 的另一位用户报告了与 repo 名称相关的错误,据报道该错误已修复,但也与我的命名方案无关。

我将不胜感激。

启用系统诊断的日志:

2020-05-12T14:04:50.7026161Z ##[debug]Evaluating condition for step: 'Checkout my_repo_name@branch-name to s/my_repo_name'
2020-05-12T14:04:50.7028997Z ##[debug]Evaluating: SucceededNode()
2020-05-12T14:04:50.7029712Z ##[debug]Evaluating SucceededNode:
2020-05-12T14:04:50.7031453Z ##[debug]=> True
2020-05-12T14:04:50.7032579Z ##[debug]Result: True
2020-05-12T14:04:50.7033673Z ##[section]Starting: Checkout my_repo_name@branch-name to s/my_repo_name
2020-05-12T14:04:50.7039346Z ==============================================================================
2020-05-12T14:04:50.7039760Z Task         : Get sources
2020-05-12T14:04:50.7040166Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-05-12T14:04:50.7040566Z Version      : 1.0.0
2020-05-12T14:04:50.7040823Z Author       : Microsoft
2020-05-12T14:04:50.7041228Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-05-12T14:04:50.7041850Z ==============================================================================
2020-05-12T14:04:51.1060976Z ##[debug]Processed: ##vso[plugininternal.updaterepositorypath alias=my_repo_name;]/home/vsts/work/1/s/my_repo_name
2020-05-12T14:04:51.1073510Z ##[debug]Repository requires to be placed at '/home/vsts/work/1/s/my_repo_name', current location is '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.1472643Z Syncing repository: my_repo_name (git)
2020-05-12T14:04:51.1493079Z ##[debug]repository url=https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name
2020-05-12T14:04:51.1500653Z ##[debug]targetPath=/home/vsts/work/1/s/my_repo_name
2020-05-12T14:04:51.1519093Z ##[debug]sourceBranch=refs/heads/branch-name
2020-05-12T14:04:51.1521059Z ##[debug]sourceVersion=9d9d1ddeb7ba058e4c1ead2cfc84fb6286169838
2020-05-12T14:04:51.1522993Z ##[debug]clean=False
2020-05-12T14:04:51.1524037Z ##[debug]checkoutSubmodules=False
2020-05-12T14:04:51.1525104Z ##[debug]checkoutNestedSubmodules=False
2020-05-12T14:04:51.1526598Z ##[debug]exposeCred=False
2020-05-12T14:04:51.1527760Z ##[debug]fetchDepth=0
2020-05-12T14:04:51.1528845Z ##[debug]gitLfsSupport=False
2020-05-12T14:04:51.1529873Z ##[debug]acceptUntrustedCerts=False
2020-05-12T14:04:51.1530779Z ##[debug]schannelSslBackend=False
2020-05-12T14:04:51.1589934Z ##[debug]Which: 'git'
2020-05-12T14:04:51.1653673Z ##[debug]Location: 'matches.First()'
2020-05-12T14:04:51.1672364Z ##[debug]Get git version.
2020-05-12T14:04:51.1687205Z ##[command]git version
2020-05-12T14:04:51.1870323Z ##[debug]Starting process:
2020-05-12T14:04:51.1871792Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.1872922Z ##[debug]  Arguments: 'version'
2020-05-12T14:04:51.1874014Z ##[debug]  Working directory: '/home/vsts/work'
2020-05-12T14:04:51.1875162Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.1876939Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.1879045Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.1880531Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.1881811Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.1883039Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.1883951Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.1994315Z ##[debug]Exited process 2641 with exit code 0
2020-05-12T14:04:51.1998531Z ##[debug]Process started with process id 2641, waiting for process exit.
2020-05-12T14:04:51.2050490Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2189303Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2193841Z ##[debug]Finished process 2641 with exit code 0, and elapsed time 00:00:00.0354826.
2020-05-12T14:04:51.2195045Z git version 2.26.2
2020-05-12T14:04:51.2202161Z ##[debug]Detect git version: 2.26.2.
2020-05-12T14:04:51.2203371Z ##[debug]Which: 'git-lfs'
2020-05-12T14:04:51.2244957Z ##[debug]Location: 'matches.First()'
2020-05-12T14:04:51.2256697Z ##[debug]Get git-lfs version.
2020-05-12T14:04:51.2258520Z ##[command]git lfs version
2020-05-12T14:04:51.2260402Z ##[debug]Starting process:
2020-05-12T14:04:51.2262493Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2265496Z ##[debug]  Arguments: 'lfs version'
2020-05-12T14:04:51.2268896Z ##[debug]  Working directory: '/home/vsts/work'
2020-05-12T14:04:51.2272008Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2274779Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2276598Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2279938Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2282047Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2283909Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2286017Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2301439Z ##[debug]Updated oom_score_adj to 500 for PID: 2645.
2020-05-12T14:04:51.2303866Z ##[debug]Process started with process id 2645, waiting for process exit.
2020-05-12T14:04:51.2385647Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2429252Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2431173Z ##[debug]Exited process 2645 with exit code 0
2020-05-12T14:04:51.2432607Z ##[debug]Finished process 2645 with exit code 0, and elapsed time 00:00:00.0099436.
2020-05-12T14:04:51.2434683Z git-lfs/2.10.0 (GitHub; linux amd64; go 1.13.4)
2020-05-12T14:04:51.2436118Z ##[debug]Detect git-lfs version: '2.10.0'.
2020-05-12T14:04:51.2437198Z ##[debug]Set git useragent to: git/2.26.2 (vsts-agent-git/2.166.4).
2020-05-12T14:04:51.2441563Z ##[debug]Checking if the repo on /home/vsts/work/1/s/my_repo_name matches the expected repository origin URL. expected Url: https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name
2020-05-12T14:04:51.2444183Z ##[debug]Repository is not found since '.git' directory does not exist under. /home/vsts/work/1/s/my_repo_name
2020-05-12T14:04:51.2499145Z ##[debug]Init git repository at: /home/vsts/work/1/s/my_repo_name.
2020-05-12T14:04:51.2510361Z ##[command]git init "/home/vsts/work/1/s/my_repo_name"
2020-05-12T14:04:51.2511293Z ##[debug]Starting process:
2020-05-12T14:04:51.2512329Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2512986Z ##[debug]  Arguments: 'init "/home/vsts/work/1/s/my_repo_name"'
2020-05-12T14:04:51.2513632Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2514575Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2516291Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2517923Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2519787Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2521504Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2523275Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2525052Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2548411Z ##[debug]Updated oom_score_adj to 500 for PID: 2652.
2020-05-12T14:04:51.2550126Z ##[debug]Process started with process id 2652, waiting for process exit.
2020-05-12T14:04:51.2584017Z Initialized empty Git repository in /home/vsts/work/1/s/my_repo_name/.git/
2020-05-12T14:04:51.2589477Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2593576Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2615187Z ##[debug]Exited process 2652 with exit code 0
2020-05-12T14:04:51.2616059Z ##[debug]Finished process 2652 with exit code 0, and elapsed time 00:00:00.0070099.
2020-05-12T14:04:51.2617026Z ##[debug]Add git remote: origin to url: https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name for repository under: /home/vsts/work/1/s/my_repo_name.
2020-05-12T14:04:51.2617937Z ##[command]git remote add origin https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name
2020-05-12T14:04:51.2618640Z ##[debug]Starting process:
2020-05-12T14:04:51.2619507Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2620529Z ##[debug]  Arguments: 'remote add origin https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name'
2020-05-12T14:04:51.2621785Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2622679Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2623608Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2624492Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2625344Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2626267Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2627149Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2628339Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2640427Z ##[debug]Updated oom_score_adj to 500 for PID: 2653.
2020-05-12T14:04:51.2642220Z ##[debug]Process started with process id 2653, waiting for process exit.
2020-05-12T14:04:51.2663211Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2666696Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2684647Z ##[debug]Exited process 2653 with exit code 0
2020-05-12T14:04:51.2685549Z ##[debug]Finished process 2653 with exit code 0, and elapsed time 00:00:00.0057216.
2020-05-12T14:04:51.2687330Z ##[debug]Processed: ##vso[task.setprogress value=0]Starting fetch...
2020-05-12T14:04:51.2688086Z ##[debug]Disable git auto garbage collection.
2020-05-12T14:04:51.2688591Z ##[command]git config gc.auto 0
2020-05-12T14:04:51.2689179Z ##[debug]Starting process:
2020-05-12T14:04:51.2690042Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2691478Z ##[debug]  Arguments: 'config gc.auto 0'
2020-05-12T14:04:51.2693248Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2694493Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2695479Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2749342Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2750075Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2750654Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2751529Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2752129Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2752605Z ##[debug]Updated oom_score_adj to 500 for PID: 2654.
2020-05-12T14:04:51.2753117Z ##[debug]Process started with process id 2654, waiting for process exit.
2020-05-12T14:04:51.2753588Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2754013Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2754433Z ##[debug]Exited process 2654 with exit code 0
2020-05-12T14:04:51.2754987Z ##[debug]Finished process 2654 with exit code 0, and elapsed time 00:00:00.0061694.
2020-05-12T14:04:51.2760670Z ##[debug]Checking git config http.https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name.extraheader exist or not
2020-05-12T14:04:51.2762334Z ##[command]git config --get-all http.https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name.extraheader
2020-05-12T14:04:51.2763333Z ##[debug]Starting process:
2020-05-12T14:04:51.2764099Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2765011Z ##[debug]  Arguments: 'config --get-all http.https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name.extraheader'
2020-05-12T14:04:51.2765920Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2766686Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2767561Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2768342Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2769079Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2769786Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2770519Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2771260Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2785860Z ##[debug]Updated oom_score_adj to 500 for PID: 2655.
2020-05-12T14:04:51.2786477Z ##[debug]Process started with process id 2655, waiting for process exit.
2020-05-12T14:04:51.2801795Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2803249Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2814996Z ##[debug]Exited process 2655 with exit code 1
2020-05-12T14:04:51.2815856Z ##[debug]Finished process 2655 with exit code 1, and elapsed time 00:00:00.0050618.
2020-05-12T14:04:51.2816621Z ##[debug]Checking git config http.proxy exist or not
2020-05-12T14:04:51.2817522Z ##[command]git config --get-all http.proxy
2020-05-12T14:04:51.2818209Z ##[debug]Starting process:
2020-05-12T14:04:51.2819555Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2820261Z ##[debug]  Arguments: 'config --get-all http.proxy'
2020-05-12T14:04:51.2821029Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2822476Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2823380Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2824053Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2824680Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2825273Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2825872Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2826462Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2827621Z ##[debug]Updated oom_score_adj to 500 for PID: 2656.
2020-05-12T14:04:51.2828701Z ##[debug]Process started with process id 2656, waiting for process exit.
2020-05-12T14:04:51.2837649Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2838475Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.2908214Z ##[debug]Exited process 2656 with exit code 1
2020-05-12T14:04:51.2908854Z ##[debug]Finished process 2656 with exit code 1, and elapsed time 00:00:00.0027582.
2020-05-12T14:04:51.2909327Z ##[debug]fetchDepth : 0
2020-05-12T14:04:51.2909701Z ##[debug]fetchByCommit : True
2020-05-12T14:04:51.2910131Z ##[debug]sourceVersion : 9d9d1ddeb7ba058e4c1ead2cfc84fb6286169838
2020-05-12T14:04:51.2911662Z ##[debug]Fetch git repository at: /home/vsts/work/1/s/my_repo_name remote: origin.
2020-05-12T14:04:51.2915696Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin
2020-05-12T14:04:51.2916313Z ##[debug]Starting process:
2020-05-12T14:04:51.2916896Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:51.2919781Z ##[debug]  Arguments: '-c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin'
2020-05-12T14:04:51.2920691Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:51.2921472Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:51.2922056Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:51.2922657Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:51.2923197Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:51.2923716Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:51.2924267Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:51.2924808Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:51.2925648Z ##[debug]Updated oom_score_adj to 500 for PID: 2657.
2020-05-12T14:04:51.2926164Z ##[debug]Process started with process id 2657, waiting for process exit.
2020-05-12T14:04:51.4105389Z remote: TF401019: The Git repository with name or identifier my_repo_name does not exist or you do not have permissions for the operation you are attempting.
2020-05-12T14:04:51.4109279Z fatal: repository 'https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name/' not found
2020-05-12T14:04:51.4125479Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.4126038Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:51.4126478Z ##[debug]Exited process 2657 with exit code 128
2020-05-12T14:04:51.4127039Z ##[debug]Finished process 2657 with exit code 128, and elapsed time 00:00:00.1216020.
2020-05-12T14:04:51.5179722Z ##[debug]Processed: ##vso[telemetry.publish area=AzurePipelinesAgent;feature=GitFetch]"ElapsedTimeMilliseconds":"124","RefSpec":"","RemoteName":"origin","FetchDepth":"0","ExitCode":"128","Options":"--force --tags --prune --progress --no-recurse-submodules origin "
2020-05-12T14:04:51.5219540Z ##[warning]Git fetch failed with exit code 128, back off 3.818 seconds before retry.
2020-05-12T14:04:51.5231122Z ##[debug]Processed: ##vso[task.logissue type=warning;]Git fetch failed with exit code 128, back off 3.818 seconds before retry.
2020-05-12T14:04:55.2569105Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin
2020-05-12T14:04:55.2570278Z ##[debug]Starting process:
2020-05-12T14:04:55.2571534Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:55.2574865Z ##[debug]  Arguments: '-c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin'
2020-05-12T14:04:55.2576010Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:55.2576659Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:55.2577258Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:55.2577855Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:55.2578410Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:55.2578942Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:55.2579494Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:55.2580041Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:55.2590335Z ##[debug]Updated oom_score_adj to 500 for PID: 2671.
2020-05-12T14:04:55.2590881Z ##[debug]Process started with process id 2671, waiting for process exit.
2020-05-12T14:04:55.3913623Z remote: TF401019: The Git repository with name or identifier my_repo_name does not exist or you do not have permissions for the operation you are attempting.
2020-05-12T14:04:55.3914981Z fatal: repository 'https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name/' not found
2020-05-12T14:04:55.3928226Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:55.3929729Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:55.3935126Z ##[debug]Exited process 2671 with exit code 128
2020-05-12T14:04:55.3935978Z ##[debug]Finished process 2671 with exit code 128, and elapsed time 00:00:00.1367994.
2020-05-12T14:04:55.4529967Z ##[debug]Processed: ##vso[telemetry.publish area=AzurePipelinesAgent;feature=GitFetch]"ElapsedTimeMilliseconds":"137","RefSpec":"","RemoteName":"origin","FetchDepth":"0","ExitCode":"128","Options":"--force --tags --prune --progress --no-recurse-submodules origin "
2020-05-12T14:04:55.4532940Z ##[warning]Git fetch failed with exit code 128, back off 3.705 seconds before retry.
2020-05-12T14:04:55.4540363Z ##[debug]Processed: ##vso[task.logissue type=warning;]Git fetch failed with exit code 128, back off 3.705 seconds before retry.
2020-05-12T14:04:59.1017290Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin
2020-05-12T14:04:59.1019284Z ##[debug]Starting process:
2020-05-12T14:04:59.1020257Z ##[debug]  File name: '/usr/bin/git'
2020-05-12T14:04:59.1023516Z ##[debug]  Arguments: '-c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin'
2020-05-12T14:04:59.1024564Z ##[debug]  Working directory: '/home/vsts/work/1/s/my_repo_name'
2020-05-12T14:04:59.1025344Z ##[debug]  Require exit code zero: 'False'
2020-05-12T14:04:59.1026168Z ##[debug]  Encoding web name:  ; code page: ''
2020-05-12T14:04:59.1026975Z ##[debug]  Force kill process on cancellation: 'False'
2020-05-12T14:04:59.1027704Z ##[debug]  Redirected STDIN: 'False'
2020-05-12T14:04:59.1028920Z ##[debug]  Persist current code page: 'False'
2020-05-12T14:04:59.1029714Z ##[debug]  Keep redirected STDIN open: 'False'
2020-05-12T14:04:59.1030437Z ##[debug]  High priority process: 'False'
2020-05-12T14:04:59.1057658Z ##[debug]Updated oom_score_adj to 500 for PID: 2685.
2020-05-12T14:04:59.1060659Z ##[debug]Process started with process id 2685, waiting for process exit.
2020-05-12T14:04:59.2116975Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:59.2136844Z remote: TF401019: The Git repository with name or identifier my_repo_name does not exist or you do not have permissions for the operation you are attempting.
2020-05-12T14:04:59.2138810Z ##[debug]Exited process 2685 with exit code 128
2020-05-12T14:04:59.2153175Z fatal: repository 'https://my_org.visualstudio.com/PROJECT_NAME/_git/my_repo_name/' not found
2020-05-12T14:04:59.2160119Z ##[debug]STDOUT/STDERR stream read finished.
2020-05-12T14:04:59.2162214Z ##[debug]Finished process 2685 with exit code 128, and elapsed time 00:00:00.1144540.
2020-05-12T14:04:59.2672809Z ##[debug]Processed: ##vso[telemetry.publish area=AzurePipelinesAgent;feature=GitFetch]"ElapsedTimeMilliseconds":"116","RefSpec":"","RemoteName":"origin","FetchDepth":"0","ExitCode":"128","Options":"--force --tags --prune --progress --no-recurse-submodules origin "
2020-05-12T14:04:59.2675019Z ##[error]Git fetch failed with exit code: 128
2020-05-12T14:04:59.2676698Z ##[debug]Processed: ##vso[task.logissue type=error;]Git fetch failed with exit code: 128
2020-05-12T14:04:59.2686685Z ##[debug]Processed: ##vso[task.complete result=Failed;]
2020-05-12T14:04:59.2687848Z ##[debug]   at Agent.Plugins.Repository.GitSourceProvider.GetSourceAsync(AgentTaskPluginExecutionContext executionContext, RepositoryResource repository, CancellationToken cancellationToken)
   at Agent.Plugins.Repository.CheckoutTask.RunAsync(AgentTaskPluginExecutionContext executionContext, CancellationToken token)
   at Agent.PluginHost.Program.Main(String[] args)
2020-05-12T14:04:59.2692548Z ##[section]Finishing: Checkout my_repo_name@branch-name to s/my_repo_name

【问题讨论】:

【参考方案1】:

我用内联syntax:- checkout: git://MyProject/MyRepo # Azure Repos Git repository in the same organization测试,它可以正常检出多个项目的repos。你能分享你的 yaml 定义脚本的示例吗?

steps:
  - checkout: git://111/forTest
  - checkout: git://Test01/Test02
  - checkout: git://TestCsharp1/TestCsharp1

更新

当我使用这个语法时:- checkout: git://MY_OTHER_PROJECT/my_repo_name/repo_branch,我可以重现你的问题:

要修复它,我们需要通过附加@<ref> 来指定引用。例如:

steps:
  - checkout: git://111/forTest@dev

这里是syntax,可以参考。

【讨论】:

感谢您对其进行测试。这是我的 azure-pipelines.yml 文件:pastebin.com/XmknFzc2 感谢您的分享,我可以重现您的问题,请查看我的更新。 休,感谢您的回复,但它并没有改变输出。我什至继续删除了整个 ref 分支,并将 repos 保留为 git://MY_OTHER_PROJECT/my_repo_name,但我仍然看到相同的错误消息。 抱歉回复晚了。管道的工作授权范围是“集合”还是“项目”?如果范围是集合,则需要检查Project Collection Build Service (your-collection-name)是否存在于repo安全中的用户列表中。 休,它是“集合”,正如我在问题中所说,我已将“current_project_name 构建服务(org_name)”添加到“other_project”并赋予它“创建标签,读取”访问权限。此外,我刚刚再次确认了“项目集合构建服务(org_name)”的存在,并且在两个项目中都存在。

以上是关于无法从其他项目签出 repos的主要内容,如果未能解决你的问题,请参考以下文章

在 mac 上从 svn 签出后无法运行 cocos2d-x 工作副本项目

从特定目录签出 GitHub Action

无法从GitHub分叉存储库签出分支

将所有项目签出到某个分支

FileNet P8 无法签出文档

在 Mac OS 山狮上设置 Subversion 服务器(可以通过浏览器访问,但无法从 subversion 签出)[关闭]