询问者
Release Management 远程发布到VM总是显示Access is denied

问题
-
利用release management build完project以后, 想通过windows machine file copy来发布到VM上, 但是release的log总是出现下面错路而失败
-
2017-02-10T08:20:14.7026984Z ##[section]Starting: Copy files from $(System.DefaultWorkingDirectory)/FREImportTool/drop
-
2017-02-10T08:20:14.7506981Z ==============================================================================
-
2017-02-10T08:20:14.7506981Z Task : Windows Machine File Copy
-
2017-02-10T08:20:14.7506981Z Description : Copy files to remote machine(s)
-
2017-02-10T08:20:14.7506981Z Version : 1.0.39
-
2017-02-10T08:20:14.7506981Z Author : Microsoft Corporation
-
2017-02-10T08:20:14.7506981Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=627415)
-
2017-02-10T08:20:14.7506981Z ==============================================================================
-
2017-02-10T08:20:14.7876985Z Preparing task execution handler.
-
2017-02-10T08:20:18.9867177Z Executing the powershell script: D:\a\_tasks\WindowsMachineFileCopy_731004d4-1d66-4f70-8c05-638018b22210\1.0.39\WindowsMachineFileCopy.ps1
-
2017-02-10T08:20:27.2735789Z Copy started for - '52.160.105.120'
-
2017-02-10T08:20:27.8996568Z
-
2017-02-10T08:20:27.8996568Z -------------------------------------------------------------------------------
-
2017-02-10T08:20:27.8996568Z ROBOCOPY :: Robust File Copy for Windows
-
2017-02-10T08:20:27.8996568Z -------------------------------------------------------------------------------
-
2017-02-10T08:20:27.8996568Z
-
2017-02-10T08:20:28.0238503Z Started : Friday, February 10, 2017 8:20:27 AM
-
2017-02-10T08:20:28.0238503Z 2017/02/10 08:20:28 ERROR 5 (0x00000005) Getting File System Type of Destination \\52.160.105.120\E$\FREImportTool\
-
2017-02-10T08:20:28.0238503Z Access is denied.
-
2017-02-10T08:20:28.0238503Z
-
2017-02-10T08:20:28.0238503Z
-
2017-02-10T08:20:28.0238503Z Source : D:\a\r1\a\FREImportTool\drop\
-
2017-02-10T08:20:28.0238503Z Dest - \\52.160.105.120\E$\FREImportTool\
-
2017-02-10T08:20:28.0238503Z
-
2017-02-10T08:20:28.0238503Z Files : *.*
-
2017-02-10T08:20:28.0238503Z
-
2017-02-10T08:20:28.0238503Z Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
-
2017-02-10T08:20:28.0238503Z
-
2017-02-10T08:20:28.0238503Z ------------------------------------------------------------------------------
-
2017-02-10T08:20:28.4046247Z
-
2017-02-10T08:20:28.4046247Z 2017/02/10 08:20:28 ERROR 5 (0x00000005) Creating Destination Directory \\52.160.105.120\E$\FREImportTool\
-
2017-02-10T08:20:28.4046247Z Access is denied.
-
2017-02-10T08:20:28.4046247Z
-
2017-02-10T08:20:28.5287134Z \\52.160.105.120 was deleted successfully.
-
2017-02-10T08:20:28.5287134Z
-
2017-02-10T08:20:28.5727143Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource : 52.160.105.120
-
2017-02-10T08:20:28.5727143Z Copying failed. Consult the robocopy logs for more details. ---> System.Management.Automation.RuntimeException: Copying failed for resource : 52.160.105.120
-
2017-02-10T08:20:28.5727143Z Copying failed. Consult the robocopy logs for more details.
-
2017-02-10T08:20:28.5727143Z --- End of inner exception stack trace ---
-
2017-02-10T08:20:28.5727143Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
-
2017-02-10T08:20:28.5727143Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
-
2017-02-10T08:20:28.5727143Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
-
2017-02-10T08:20:28.5727143Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
-
2017-02-10T08:20:28.5727143Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
-
2017-02-10T08:20:28.5727143Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
-
2017-02-10T08:20:28.5827128Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
-
2017-02-10T08:20:28.5847129Z ##[section]Finishing: Copy files from $(System.DefaultWorkingDirectory)/FREImportTool/drop
VM是Azure上的VM,连接到physical的server上, 尝试过换用Azure File Copy还是会有权限的错误。 在VM上也更改过目标文件夹的访问权限,但是依然是同样的错。不知道什么原因
-
全部回复
-
Hi Neil Qin,
Thank you for posting here.
我建议你可以:
1. 尝试在目标机器上创建一个新的文件夹,共享这个文件夹,使所有用户在这个文件夹路径上具有 读\写 权限。
2. 尝试在Machines使用计算机的名字加端口,或者IP加端口。
3. 确保Admin login 和 password是正确的。
4. 确保destination folder是正确的,你可以直接在目标机器上右击这个文件夹>>属性>>共享>>网络路径, 然后直接把这个路径复制,黏贴到destination folder里面。
Best Regards
Limitxiao Gao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.