简体   繁体   English

无法将项目发布到 Azure Devops 中的文件共享

[英]Unable to Publish artifacts to file share in Azure Devops

We are trying to setup CI/CD for a winform app developed using DotNet core 6. We have setup the build pipeline and it's producing the correct set of artifacts but the problem is we are unable to publish these artifacts to network file share drive (DFS server).我们正在尝试为使用 DotNet core 6 开发的 winform 应用程序设置 CI/CD。我们已经设置了构建管道,它正在生成正确的工件集,但问题是我们无法将这些工件发布到网络文件共享驱动器 (DFS服务器)。 While connecting to network file share we are getting error Incorrect username or password.连接到网络文件共享时,我们收到错误用户名或密码不正确。 Do we need a service account which would connect to network file share ?我们是否需要一个可以连接到网络文件共享的服务帐户? If there is a service account needed we don't see any option in release pipeline under which task in Azure Devops we need to pass username and password as the Publish artifact task allow us to define the network location without using any credentials.如果需要服务帐户,我们在发布管道中看不到任何选项,在 Azure Devops 中的哪个任务下,我们需要传递用户名和密码,因为发布工件任务允许我们在不使用任何凭据的情况下定义网络位置。 Can anyone please suggest.任何人都可以请建议。

Do we need a service account which would connect to network file share ?我们是否需要一个可以连接到网络文件共享的服务帐户?

Seems like you asked here too.好像你也在这里问过。 For a self-hosted agent, yes, we need a service account that can connect to the network file share.对于自托管代理,是的,我们需要一个可以连接到网络文件共享的服务帐户。

Basically, you can try to setup the agent with the account which has the correct permission (write permission) to access the network share.基本上,您可以尝试使用具有正确权限(写入权限)访问网络共享的帐户设置代理。 (specify the account as the agent service account). (指定帐户为代理服务帐户)。

Alternately, you can use Windows Machine File Copy task to copy the artifacts to the network share.或者,您可以使用Windows 机器文件复制任务将工件复制到网络共享。 In the task you can specify the username and password to access the network share.在任务中,您可以指定访问网络共享的用户名和密码。

在此处输入图像描述

Can be accomplish through service principal/agent that has write permission to the drive.可以通过对驱动器具有写入权限的服务主体/代理来完成。 You can then create scripts in the build pipeline to transfer the file to the Azure storage account blob container.然后,您可以在构建管道中创建脚本以将文件传输到 Azure 存储帐户 blob 容器。

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

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