繁体   English   中英

无法从 azure 存储库下载工件,用于 azure devops 服务器中的发布管道

[英]Unable to download artifact from azure repo for release pipeline in azure devops server

无法从 azure 存储库下载工件,用于 azure devops 服务器中的发布管道

试图在 azure devops 服务器/TFS 中创建发布管道,我将 deplpyment yamls 保存在 azure 存储库中,大多数人在尝试所有可能的解决方案时都死了

2021-02-18T01:29:00.4023196Z ##[debug]Evaluating: SucceededNode()
2021-02-18T01:29:00.4028590Z ##[debug]Evaluating SucceededNode:
2021-02-18T01:29:00.4062985Z ##[debug]=> True
2021-02-18T01:29:00.4084197Z ##[debug]Result: True
2021-02-18T01:29:00.4139706Z ##[section]Starting: Download Artifacts
2021-02-18T01:29:00.4228690Z Creating artifacts directory: C:\application2_agent\_work\r1\a
2021-02-18T01:29:00.4312837Z Created artifacts directory: C:\application2_agent\_work\r1\a
2021-02-18T01:29:00.4312949Z Downloading artifact
2021-02-18T01:29:00.4322919Z Starting artifacts download...
2021-02-18T01:29:00.4333439Z Downloading linked artifact application-ebx-acc-repo of type TFGit...
2021-02-18T01:29:00.4357233Z Ensuring artifact folder C:\application2_agent\_work\r1\a\application-ebx-acc-repo exists and is clean.
2021-02-18T01:29:00.4588608Z Syncing repository: 18c91948-ed72-4057-8f2f-3dcf1cf9eb97 (Git)
2021-02-18T01:29:00.4622920Z Prepending Path environment variable with directory containing 'git.exe'.
2021-02-18T01:29:00.4628360Z ##[debug]Path: 'C:\application2_agent\externals\git\cmd;C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\tsiadm\Downloads;C:\Program Files\Docker;F:\agentutility\apache-maven-3.6.3\bin;C:\PROGRA~1\Java\jdk-15.0.2\bin;C:\Users\admjawedt02\AppData\Local\Microsoft\WindowsApps'
2021-02-18T01:29:00.4649646Z ##[debug]Get git version.
2021-02-18T01:29:00.4665743Z ##[command]git version
2021-02-18T01:29:00.5619545Z git version 2.18.0.windows.1
2021-02-18T01:29:00.5642621Z ##[debug]Detect git version: 2.18.0.
2021-02-18T01:29:00.5726643Z ##[debug]Get git-lfs version.
2021-02-18T01:29:00.5727602Z ##[command]git lfs version
2021-02-18T01:29:00.7459095Z git-lfs/2.12.1 (GitHub; windows amd64; go 1.14.10; git 85b28e06)
2021-02-18T01:29:00.7460870Z ##[debug]Detect git-lfs version: '2.12.1'.
2021-02-18T01:29:00.7464636Z ##[debug]Set git useragent to: git/2.18.0 (vsts-agent-git/2.144.2).
2021-02-18T01:29:00.7500381Z ##[debug]Checking if the repo on C:\application2_agent\_work\r1\a\application-ebx-acc-repo matches the expected repository origin URL. expected Url: https://azdevops.demo.net/DefaultCollection/Datsoul/_git/Datsoul
2021-02-18T01:29:00.7501113Z ##[debug]Repository is not found since '.git' directory does not exist under. C:\application2_agent\_work\r1\a\application-ebx-acc-repo
2021-02-18T01:29:00.7526034Z ##[debug]Init git repository at: C:\application2_agent\_work\r1\a\application-ebx-acc-repo.
2021-02-18T01:29:00.7540690Z ##[command]git init "C:\application2_agent\_work\r1\a\application-ebx-acc-repo"
2021-02-18T01:29:00.8541126Z Initialized empty Git repository in C:/application2_agent/_work/r1/a/application-ebx-acc-repo/.git/
2021-02-18T01:29:00.8615931Z ##[debug]Add git remote: origin to url: https://azdevops.demo.net/DefaultCollection/Datsoul/_git/Datsoul for repository under: C:\application2_agent\_work\r1\a\application-ebx-acc-repo.
2021-02-18T01:29:00.8616101Z ##[command]git remote add origin https://azdevops.demo.net/DefaultCollection/Datsoul/_git/Datsoul
2021-02-18T01:29:00.9703602Z ##[debug]Disable git auto garbage collection.
2021-02-18T01:29:00.9703752Z ##[command]git config gc.auto 0
2021-02-18T01:29:01.0556858Z ##[debug]Checking git config http.https://azdevops.demo.net/DefaultCollection/Datsoul/_git/Datsoul.extraheader exist or not
2021-02-18T01:29:01.0557012Z ##[command]git config --get-all http.https://azdevops.demo.net/DefaultCollection/Datsoul/_git/Datsoul.extraheader
2021-02-18T01:29:01.1484525Z ##[debug]Checking git config http.proxy exist or not
2021-02-18T01:29:01.1484704Z ##[command]git config --get-all http.proxy
2021-02-18T01:29:01.2489712Z ##[debug]Remove any proxy setting from git config.
2021-02-18T01:29:01.2524557Z ##[debug]Unset git config --unset-all http.proxy
2021-02-18T01:29:01.2524692Z ##[command]git config --unset-all http.proxy
2021-02-18T01:29:01.3521192Z ##[warning]Unable to remove "http.proxy" from the git config. To remove the credential, execute "git config --unset-all http.proxy" from the repository root "http.proxy".
2021-02-18T01:29:01.3559540Z ##[debug]Fetch git repository at: C:\application2_agent\_work\r1\a\application-ebx-acc-repo remote: origin.
2021-02-18T01:29:01.3580216Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin
2021-02-18T01:29:01.5248741Z fatal: could not read Password for 'http://satyam@xyz.net@10.220.129.49:80': terminal prompts disabled
2021-02-18T01:29:01.5514915Z An error occurred during download: Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.ArtifactDownloadException: Unexpected error occurred while downloading artifacts ---> System.InvalidOperationException: Git fetch failed with exit code: 128
   at Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.GetSourceAsync(IExecutionContext executionContext, ServiceEndpoint endpoint, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.TfsGitArtifact.DownloadAsync(IExecutionContext executionContext, ArtifactDefinition artifactDefinition, String downloadFolderPath)
   --- End of inner exception stack trace ---
   at 
Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.GetSourceAsync(IExecutionContext executionContext, ServiceEndpoint endpoint, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.TfsGitArtifact.DownloadAsync(IExecutionContext executionContext, ArtifactDefinition artifactDefinition, String downloadFolderPath)
   --- End of inner exception stack trace ---
   at 
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.DownloadArtifacts(IExecutionContext executionContext, IList`1 agentArtifactDefinitions, String artifactsWorkingFolder)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.DownloadArtifactsAndCommitsAsync(IExecutionContext executionContext, Object data)
2021-02-18T01:29:01.5566770Z ##[error]Unexpected error occurred while downloading artifacts
2021-02-18T01:29:01.5570926Z ##[debug]Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.ArtifactDownloadException: Unexpected error occurred while downloading artifacts ---> System.InvalidOperationException: Git fetch failed with exit code: 128
   at Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.GetSourceAsync(IExecutionContext executionContext, ServiceEndpoint endpoint, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.TfsGitArtifact.DownloadAsync(IExecutionContext executionContext, ArtifactDefinition artifactDefinition, String downloadFolderPath)
   --- End of inner exception stack trace ---
2021-02-18T01:29:01.5574268Z ##[section]Finishing: Download Artifacts

##[警告]无法从 git 配置中删除“http.proxy”。 要删除凭据...

致命:无法读取“http://satyam@xyz.net@10.220.129.49:80”的密码:终端提示已禁用

从上面的错误来看,它似乎是由代理机器上的 git 代理设置引起的。 git代理设置删除失败,提示询问代理密码。

您可以尝试登录您的代理机器并在本地运行以下命令以从 git 配置中删除任何代理设置。

git config --unset-all http.proxy

然后您还需要检查 Windows 上的系统范围配置区域,即%PROGRAMDATA%\Git\config文件。 您需要手动编辑此配置文件以取消设置代理设置。

您可以运行命令git config --show-origin http.proxy来获取系统范围的配置区域。 看到这个线程

从 git 配置中删除代理设置后。 您可以尝试再次运行您的管道。

将作业授权 scope 限制到当前项目 Azure 管道提供两个限制作业授权 scope 到当前项目设置:

将作业授权 scope 限制为非发布管道的当前项目 - 此设置适用于 YAML 管道和经典构建管道。 此设置不适用于经典发布管道。 将作业授权 scope 限制为发布管道的当前项目 - 此设置仅适用于经典发布管道。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM