【问题标题】:FATAL: Received: 403 Forbidden when creating cache on Digital ocean with private gitlab runnerFATAL: Received: 403 Forbidden when create cache on Digital ocean with private gitlab runner
【发布时间】:2018-12-10 09:34:46
【问题描述】:

我正在使用 gitlab runner 在数字海洋服务器上运行测试。我想缓存 gem,这样它就不会为每个构建从头开始安装 gem。我的gitlab-ci.yml 中的缓存部分如下所示:

[runners.cache]
    Type = "s3"
    ServerAddress = "ams3.digitaloceanspaces.com"
    AccessKey = "KEY"
    SecretKey = "SECRET"
    BucketName = "cache-for-builds"
    Insecure = true

当构建完成并且运行器尝试创建缓存时,我看到了

我尝试重新生成 Digital Ocean Spaces 密钥和秘密,但没有帮助

我的私人 gitlab runner 堡垒服务器上也没有安装任何证书

Digital Ocean UI 中的缓存空间如下所示:

我做错了什么? 如何修复 Forbidden 错误? 如何调试此错误?

【问题讨论】:

    标签: digital-ocean gitlab-ci gitlab-ci-runner


    【解决方案1】:

    似乎我对 gitlab 运行器版本 11.5.1 的缓存部分使用了过时的配置格式。正确的配置格式是:

    # /etc/gitlab-runner/config.toml
    [[runners]]
     ...
      [runners.cache]
        Type = "s3"
        Path = "cache_for_builds"
        [runners.cache.s3]
          ServerAddress = "ams3.digitaloceanspaces.com"
          AccessKey = "<key>"
          SecretKey = "<secret>"
          BucketName = "cache-for-builds"
          BucketLocation = "ams3"
    

    【讨论】:

      猜你喜欢
      • 2020-06-27
      • 2020-06-04
      • 2012-08-21
      • 2016-03-23
      • 1970-01-01
      • 2017-05-27
      • 1970-01-01
      • 1970-01-01
      • 2021-09-06
      相关资源
      最近更新 更多