gpt4 book ai didi

Jenkins 看不到映射的驱动器

转载 作者:行者123 更新时间:2023-12-04 16:52:52 25 4
gpt4 key购买 nike

尝试在 Jenkins 中执行构建时出现以下错误:

Started by user anonymous
Building in workspace C:\Users\mryan\git\AML
[AML] $ cmd /c call C:\Users\MRYAN~1.ASA\AppData\Local\Temp\hudson3772834793680550098.bat

C:\Users\mryan\git\AML>asc-tree -v cs1 .
Array @filter_prune missing the @ in argument 1 of push() at C:\asc\asc\win2k/asc-tree. line 293.
asc-tree.: ASC (=Z:\asc) is not a directory!
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

当我打开一个普通的命令提示符并运行相同的命令 (asc-tree -v cs1 .) 时,它工作正常。

我看了一下 here并尝试在我的环境变量中使用 UNC 表示法而不是“Z:\”,但这只是给了我同样的错误,机器名称而不是驱动器。

我还尝试更改服务以使用我的帐户登录详细信息而不是“本地系统帐户”,但这似乎并没有做到。

有人有什么想法吗??

最佳答案

关注 this回答,我设法让它工作。

可以在 Aspera 支持的文章中找到解决方案:How to map network shares into drives to a Windows service permanently .

解决方案:

In order for network shares to be mapped into drives and accessible within Windows services, you need to login as the NT AUTHORITY\SYSTEM account.

To do this, download the Sysinternals Suite from Microsoft, and unzip it to a directory, say C:\TEMP The following steps assume that you've unzipped SysInternals to C:\TEMP and all the executables are in there.

  1. Launch a command prompt as Administrator.
  2. CD \TEMP
  3. psexec -i -s cmd.exe
    This launches a new command prompt window, and step 4 should be performed in that new window.
  4. net use Z: \\servername_OR_IP\sharedfolder /u:username /persistent:yes
    Provide the credentials of a user having access to the shared folder.

  5. Create a script that runs on computer startup that has only line 4 in it acccording to Microsoft's article: Assign Computer Startup scripts.

关于 Jenkins 看不到映射的驱动器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24733917/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com