首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GitLab CI: iOS项目问题(拒绝许可)

GitLab CI: iOS项目问题(拒绝许可)
EN

Stack Overflow用户
提问于 2019-03-28 14:10:47
回答 1查看 750关注 0票数 1

尝试GitLab CI为我的iOS项目,我遵循教程。

两个问题:

  1. 由于GitLab CI引发以下错误,我的GitLab(使用"shell“注册)有什么问题?
代码语言:javascript
复制
Running with gitlab-runner 11.9.0 (692ae235)
  on MyApp runner with shell DsaBC-oQ
Using Shell executor...
Running on MyComputer.network.provider...
mkdir: /Users/myusername/builds/DsaBC-oQ/0/username/myproj.tmp: Permission denied
mkdir: /Users/myusername/builds/DsaBC-oQ/0/username/myproj.tmp: Permission denied
ERROR: Job failed: exit status 1
  1. 有些人说要用"sudo“来注册gitlab-runner。但那样我就需要“码头工人”了。但是,"docker“似乎不能用于GitLab中的GitLab项目(但只有"shell”注册)。这是真的吗?(如果不是,gitlab-runner注册cmd对于码头注册来说是什么样的?)“码头”在iOS项目中是否使用GitLab?

这是我的.gitlab-ci.yml文件:

代码语言:javascript
复制
stages:
  - unit_tests

variables:
  LC_ALL: "en_US.UTF-8"
  LANG: "en_US.UTF-8"

before_script:
  - gem install bundler
  - bundle install

unit_tests:
  dependencies: []
  stage: unit_tests
  artifacts:
    paths:
      - fastlane/screenshots
      - fastlane/logs
  script:
    - bundle exec fastlane tests
  tags:
    - ios

我试着注册gitlab跑步者如下:

代码语言:javascript
复制
gitlab-runner register \
  --non-interactive \
  --url "https://gitlab.com/" \
  --registration-token "TOKENABCDEF" \
  --description "MyApp runner with shell" \
  --tag-list ios \
  --executor "shell"

"shell“试用版使Gitlab显示了上述错误(即permission denied)。

我还试着给gitlab跑步者注册码头:

代码语言:javascript
复制
gitlab-runner register \
  --non-interactive \
  --url "https://gitlab.com/" \
  --registration-token "TOKENABCEDF" \
  --description "MyApp runner with docker and ruby-2.6” \
  --tag-list ios \
  --executor "docker" \
  --docker-image ruby:2.6

但是,“码头”试验使GitLab显示了另一个错误(即[!] You cannot run CocoaPods as root),详见在这里..。

对于如何使这个用于iOS项目的GitLab最终能够正常工作,有什么想法吗??谢谢你的暗示。(经过三天的考验,我非常希望这件事能成功).

EN

回答 1

Stack Overflow用户

发布于 2019-03-29 19:19:14

事实证明,我的GitLab管道上的“拒绝许可”错误与GitLab本身无关--而是由于我的Mac上的Ruby版本不匹配,而我与gitlab运行程序连接。

我能够更新我的Ruby 在这个职位的帮助下 (即使用chruby)。关于如何在Mac上更新Ruby还有其他的可能性。重要的是要理解GitLab需要你的Mac拥有一个稳定的Ruby环境。

顺便提一句:我找到的以下是关于如何为iOS项目设置GitLab CI的最佳教程

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55399687

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档