阻止在Artifactory中

时间:2017-04-13 18:30:06

标签: nuget artifactory jfrog-mission-control

此问题涉及Artifactory Pro 4.14.2中的本地NuGet存储库。

我们使用名为DevNetRunnerSvc的服务帐户将NuGet工件发布到Artifactory。此帐户配置了Deploy/Cache权限,未配置Delete/Overwrite权限

DevNetRunnerSvc's effective permissions to the repository in question

但是,DevNetRunnerSvc仍然可以覆盖此存储库中的工件:

Artifact demonstrating modification by DevNetRunnerSvc

我希望在保护工件免受任何和所有覆盖(适用于已发布的NuGet包)方面提供一些帮助,或者确定这是一个应该转发给JFrog的错误。

其他信息:

  • 用于发布工件的(轻度清理的)命令是jfrog rt upload $(Join-Path $env:CI_PROJECT_DIR "$($env:PACKAGE).$($env:VERSION).nupkg") nuget-org-dev/org/$($env:PACKAGE)/$($env:PACKAGE).$($env:VERSION)-$($env:CI_BUILD_REF_SLUG).nupkg
  • 在调试此问题时,我已从所有群组中删除DevNetRunnerSvc
  • Deploy/Cache删除DevNetRunnerSvc权限成功阻止其将工件发布到此存储库。
  • '促进'从此存储库到另一个的已发布工件被适当阻止:

    [Info] Moving artifact: nuget-org-dev/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg to: nuget-org/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2.nupkg [Error] Artifactory response: 409 Conflict { "messages": [ { "level": "ERROR", "message": "User doesn't have permissions to move 'nuget-org-dev:org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg'. Needs delete permissions." } ] }

  • 用于执行上述操作的命令是jfrog rt move "nuget-org-dev/(org)/($($env:PACKAGE))/($($env:PACKAGE).$($env:VERSION))-$($env:CI_BUILD_REF_SLUG)(.nupkg)" "nuget-org/{1}/{2}/{3}{4}"

  • 我已将自己添加为此存储库的观察者。当DevNetRunnerSvc覆盖工件时,我会收到以下事件通知:Thu Apr 13 12:25:34 EDT 2017 [devnetrunnersvc/10.228.128.23] [CREATED] nuget-org-dev/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg

1 个答案:

答案 0 :(得分:1)

看起来这是此Jira RTFACT-14442中提到的错误,已在更高版本中修复。此外,Artifactory版本4.14.2已达到其end of life,并且JFrog将不接受此版本的任何错误。我强烈建议将Artifactory升级到最新版本6.23或7.10。