You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行Workflow下载Artifact时遭遇AuthenticationFailed错误求助

排查GitHub Workflow认证失败问题

错误信息

<?xml version="1.0" encoding="utf-8"?>
<Error>
  <Code>AuthenticationFailed</Code>
  <Message>Server failed to authenticate the request. Make sure the 
    value of Authorization header is formed correctly including the 
    signature.
    RequestId:b37a6424-701e-004c-55dc-da07c1000000
    Time:2024-07-20T19:39:41.7435261Z
  </Message>
</Error>

对应的Workflow配置

name: check actions
run-name: check actions

on: 
    workflow_dispatch:
    push:

jobs:
  artifacts:
    name: Build
    runs-on: ubuntu-latest
    steps:
        - name: use action
          uses: Legit-Labs/action-download-artifact@v2
          with:
            github_token: ${{ secrets.TOKEN }}
            workflow: artifact.yml
            path: ${{ github.workspace }}

        - run: ls -la

排查步骤

  • 验证Token的正确性

    • 确认仓库Secrets中存在TOKEN,且拼写完全匹配(大小写敏感)。
    • 检查Token权限:私有仓库需至少拥有repo权限,公有仓库需public_repo权限;跨仓库下载artifact时,默认GITHUB_TOKEN权限不足,必须使用个人访问令牌(PAT)。
    • 重新生成PAT并更新Secrets,确保粘贴时无多余空格或换行符。
  • 完善Workflow参数配置

    • 确认artifact.yml在目标仓库中存在,文件名拼写完全一致(GitHub对文件名大小写敏感)。
    • 若artifact.yml属于其他仓库,必须补充repo和owner参数,示例:
      with:
        github_token: ${{ secrets.TOKEN }}
        workflow: artifact.yml
        repo: target-repo-name
        owner: target-username
        path: ${{ github.workspace }}
      
  • 检查Token有效期

    • 若使用的是带过期时间的PAT,确认Token未过期,必要时生成无过期限制的PAT测试。

内容的提问来源于stack exchange,提问作者Mario

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 14:04:59