上传到Jfrog文物时发生故障

发布于 2025-02-01 17:06:54 字数 4173 浏览 2 评论 0 原文

我在GitHub操作中使用Jfrog CLI将二进制二进制列表上传到JFROG通用存储库。 ping to to the Artifactory Server可以确定。但是上传通过给出401。

这是动作

  - name: Configuring artifactory
    uses: "jfrog/setup-jfrog-cli@v2"
  - name: Pushing artifactory
    env: 
      APIKEY: ${{secrets.RT_APIKEY}}
    run: |
      jf c add --url https://artifactory.xxxxxx.ae:443 --user amal45 --password "$APIKEY"
      jf rt ping
      cd workspace
      sudo touch newfile.txt
      jf rt u newfile.txt github_actions_testing

错误

12:18:31 [info] [thread 2]上传伪像:newfile.txt

12:18:32 [WARN] [螺纹2](尝试1) - 上传到https://artifactory.xxxxxx.tii.ae:443/artifactory/github_actions_testing/newfile.txt;build.name=Check+default+branch;build.number=39;build.timestamp=1653481111573 ; vcs.revision=68f122d5297bfbd425125bf2d60a58f32f96356f;vcs.url=https%3A%2F%2Fgithub.com%2Famalx%2Fxxxx_build.git;vcs.branch=development: Server response: 401

12:18:33 [WARN] [螺纹2](尝试2) - 上传到

12:18:33 [WARN] [螺纹2](尝试3) - 上传到 https://artifactory.xxxxxx.ae:443/artifactory/github_actions_testions_testing/newfile.txtxtxt; name = check+deckeck+deckeck+deck+defeft+default+blanch+branch+布兰奇; = 1653481111573; VCS.Revision = 68F122D5297BFBD425125125BF2D60A58F32F96356F; VCS.URL = https%3A%3A%3A%2F%2F%2fgithub.com 2famalx%2famalx%2fxxxxxxxxxx_build: P>

12:18:34 [WARN] [线程2](尝试4) - 上传到 https://artifactory.xxxx.ae:443/artifactory/github_actions_testing/newfile.txtxtxt; = 1653481111573; vcs.revision = 68f122d5297bfbd425125125125bf2d60a58f32f96356f; vcs.url = https%3A%3A%3A%2f%2f%2fgithub.com 2fgithub.com%2famalx%2Famalx%2fxxxxx_bry.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild.guild; 服务器响应:401

{ “状态”:“失败”, “总计”:{ “成功”:0, “失败”:0 } }

12:18:34 [info] [thread 2] 3尝试使用0毫秒等待间隔

执行超时

错误:4 [错误]服务器响应:401

错误:4 [错误]失败上传1个工件。

错误:4 [错误]服务器响应:401

错误:4 [错误]上传带有错误,请查看日志

错误:使用退出代码1。

完成过程

该错误的原因可能是什么?

I am using jfrog cli in github actions to upload a binary to jfrog generic repository. Ping to the artifactory server gives OK. But Uploads fails by giving 401.

Here is the action

  - name: Configuring artifactory
    uses: "jfrog/setup-jfrog-cli@v2"
  - name: Pushing artifactory
    env: 
      APIKEY: ${{secrets.RT_APIKEY}}
    run: |
      jf c add --url https://artifactory.xxxxxx.ae:443 --user amal45 --password "$APIKEY"
      jf rt ping
      cd workspace
      sudo touch newfile.txt
      jf rt u newfile.txt github_actions_testing

Error

12:18:31 [Info] [Thread 2] Uploading artifact: newfile.txt

12:18:32 [Warn] [Thread 2] (Attempt 1) - Failure occurred while uploading to https://artifactory.xxxxxx.tii.ae:443/artifactory/github_actions_testing/newfile.txt;build.name=Check+default+branch;build.number=39;build.timestamp=1653481111573;
vcs.revision=68f122d5297bfbd425125bf2d60a58f32f96356f;vcs.url=https%3A%2F%2Fgithub.com%2Famalx%2Fxxxx_build.git;vcs.branch=development: Server response: 401

12:18:33 [Warn] [Thread 2] (Attempt 2) - Failure occurred while uploading to https://artifactory.xxxxxxx.ae:443/artifactory/github_actions_testing/newfile.txt;build.name=Check+default+branch;build.number=39;build.timestamp=1653481111573;vcs.revision=68f122d5297bfbd425125bf2d60a58f32f96356f;vcs.url=https%3A%2F%2Fgithub.com%2Famalx-%2Fxxxxxx_build.git;vcs.branch=development: Server response: 401

12:18:33 [Warn] [Thread 2] (Attempt 3) - Failure occurred while uploading to https://artifactory.xxxxxx.ae:443/artifactory/github_actions_testing/newfile.txt;build.name=Check+default+branch;build.number=39;build.timestamp=1653481111573;vcs.revision=68f122d5297bfbd425125bf2d60a58f32f96356f;vcs.url=https%3A%2F%2Fgithub.com%2Famalx%2Fxxxxx_build.git;vcs.branch=development: Server response: 401

12:18:34 [Warn] [Thread 2] (Attempt 4) - Failure occurred while uploading to https://artifactory.xxxx.ae:443/artifactory/github_actions_testing/newfile.txt;build.name=Check+default+branch;build.number=39;build.timestamp=1653481111573;vcs.revision=68f122d5297bfbd425125bf2d60a58f32f96356f;vcs.url=https%3A%2F%2Fgithub.com%2Famalx%2Fxxxxx_build.git;vcs.branch=development:
Server response: 401

{
"status": "failure",
"totals": {
"success": 0,
"failure": 0
}
}

12:18:34 [Info] [Thread 2] executor timeout after 3 attempts with 0 milliseconds wait intervals

Error: 4 [Error] Server response: 401

Error: 4 [Error] Failed uploading 1 artifacts.

Error: 4 [Error] Server response: 401

Error: 4 [Error] upload finished with errors, Please review the logs

Error: Process completed with exit code 1.

what may be the cause of this error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东风软 2025-02-08 17:06:55

问题是$ {{secrets.rt_apikey}}的用法。问题中的此工作流程为称为工作流程。我没有从呼叫者使用 with with:传递rt_apikey 工作流程

Problem here was the usage of ${{secrets.RT_APIKEY}}. This workflow here in the question was a called workflow. I was not passing the value RT_APIKEY from caller workflow using with:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文