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

GitHub Enterprise Server 3.8.8中actions/cache@v3缓存恢复失败求助

解决GitHub Enterprise Server 3.8.8中actions/cache恢复证书验证失败问题

针对你遇到的缓存恢复时unable to verify the first certificate错误,可尝试以下几种解决方案:

1. 指定GHES专属的缓存服务地址

actions/cache@v3在GHES环境下需要显式指定缓存API端点,默认的公共GitHub缓存地址不适用。修改缓存恢复步骤,添加cache-url参数:

- name: "Skopeo cache"
  uses: actions/cache@v3
  with:
    path: /usr/local/bin/skopeo
    key: binaries-${{ github.ref }}
    cache-url: https://git.custom-host.com/api/v3/repos/${{ github.repository }}/actions/caches

2. 确保Runner信任GHES的根证书

如果使用自托管Runner,需将GHES的根CA证书安装到Runner的系统信任存储中:

  • Ubuntu/Debian系统:
    sudo cp your-ghes-root-ca.crt /usr/local/share/ca-certificates/
    sudo update-ca-certificates
    
  • 如果是GHES托管的Runner,联系管理员配置全局证书信任,或在工作流中临时导入证书:
    - name: Import GHES CA certificate
      run: |
        echo "${{ secrets.GHES_ROOT_CA }}" > /usr/local/share/ca-certificates/ghes-ca.crt
        update-ca-certificates
    

3. 配置Token权限

确保工作流使用的github.token拥有actions:read权限,在工作流开头添加权限声明:

permissions:
  actions: read

4. 临时禁用证书验证(仅测试用)

若需快速验证问题根源,可临时设置环境变量跳过证书校验(生产环境不推荐):

- name: "Skopeo cache"
  uses: actions/cache@v3
  env:
    NODE_TLS_REJECT_UNAUTHORIZED: 0
  with:
    path: /usr/local/bin/skopeo
    key: binaries-${{ github.ref }}

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.05 04:08:23