gpt4 book ai didi

git - 无法创建标签

转载 作者:行者123 更新时间:2023-12-02 03:49:31 25 4
gpt4 key购买 nike

我有一台带有运行 Windows 2008R2 的 CruiseControl.Net 的构建机器。源代码在 git 仓库中。 CruiseControl 使用 cygwin 访问 git 存储库。除了标记,一切都很好。我想标记每个成功的构建,所以这里是 ccnet.config 的一部分:

<sourcecontrol type="git">
<repository>git://xxx.xxx.xxx.xxx/Project</repository>
<executable>C:\cygwin\bin\git</executable>
<branch>projectName/branchToBuild</branch>
<workingDirectory>Sources</workingDirectory>
<autoGetSource>true</autoGetSource>
<tagOnSuccess>true</tagOnSuccess>
<tagCommitMessage>CCNet Build {0}</tagCommitMessage>
<tagNameFormat>project/builds/v{0}</tagNameFormat>
<committerName>CCNet</committerName>
</sourcecontrol>

但是构建失败并出现错误:

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: error: unable to create temporary sha1 filename : No such file or directory

error: unable to write tag file
. Process command: C:\cygwin\bin\git tag -a -m "CCNet Build 6.2.18.0" project/builds/v6.2.18.0
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GitCreateTag(String tagName, String tagMessage, IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.LabelSourceControl(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

有什么问题吗?如果我从命令行执行相同的命令,一切正常。

谢谢!

通过将此添加到 msbuild 项目文件解决:

<Exec Command='C:\cygwin\bin\git tag -a -m "CCNet Build" project/builds/v$(CCNetLabel)' ContinueOnError="true"/>
<Exec Command='C:\cygwin\bin\git push origin tag project/builds/v$(CCNetLabel)' ContinueOnError="true"/>

最佳答案

这看起来运行 ccnet 服务的用户没有对存储库的写入权限。

关于git - 无法创建标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14976942/

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