concourse - 在建立与 Concourse API 的连接时出现 401 状态错误
问题描述
目前,我们正试图让 CI 在我们的实验室中工作。
我们刚刚按照大厅网站上的说明进行操作。
我们能够正确登录并~/.flyrc
按照 concourse-ci.org 和 concoursetutorial.com 网站的推荐设置。
我们注意到大多数命令都返回 401 Unauthorized 错误。
我们已经开始设置审计日志https://concourse-ci.org/concourse-web.html#audit-logs
但不清楚这写到哪里,帮助?
目前很难正确追踪这一点。顺便说一句,这是我们第一次接触大厅。
我们想知道为什么?以及我们能做些什么来解决这个问题(跨越这个小圈子)。
fly -t rdb-ci set-team --team-name a-team --local-user admin --github-org organization --verbose --print-table-headers --non-interactive
2019/07/10 22:02:37 GET /api/v1/info HTTP/1.1
Host: ci.example.org
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip
2019/07/10 22:02:37 HTTP/1.1 200 OK
Content-Length: 88
Connection: keep-alive
Content-Type: application/json
Date: Wed, 10 Jul 2019 21:02:37 GMT
Server: nginx/1.12.2
X-Concourse-Version: 5.3.0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{"version":"5.3.0","worker_version":"2.1","external_url":"https://ci.example.org"}
setting team: a-team
role owner:
users:
- local:admin
groups:
- github:organization
apply team configuration? [yN]: y
2019/07/10 22:02:53 PUT /api/v1/teams/a-team HTTP/1.1
Host: ci.example.org
User-Agent: Go-http-client/1.1
Content-Length: 71
Content-Type: application/json
Accept-Encoding: gzip
{"auth":{"owner":{"groups":["github:organization"],"users":["local:admin"]}}}
2019/07/10 22:02:53 HTTP/1.1 401 Unauthorized
Content-Length: 14
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Date: Wed, 10 Jul 2019 21:02:53 GMT
Server: nginx/1.12.2
X-Concourse-Version: 5.3.0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
not authorized
could not find a valid token.
logging in to team 'main'
2019/07/10 22:02:53 GET /api/v1/info HTTP/1.1
Host: ci.example.org
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip
could not reach the Concourse server called rdb-ci:
Get https://ci.example.org/api/v1/info: x509: certificate is valid for www.example.org, not ci.example.org
is the targeted Concourse running? better go catch it lol
解决方案
推荐阅读
- python - 在列表中准确找到 3 个 x 实例和 2 个 y 实例的干净方法?
- mysql - Kubernetes MySql 映像持久卷在初始化期间非空
- mysql - MySQL Insert 语句,如果指定插入行的列值为0,不插入?
- wordpress - 如何将 woocommerce 永久链接插入标签
- php - 不能在 Laravel 中使用 stdClass 类型的对象作为数组
- swift - 转换时是否需要明确区分大小写?
- python - Pandas DataFrame:如何从不总是以两个数字结尾的列中提取最后两个字符串类型数字
- graphql - 在 GraphQL 中,如何“聚合”属性
- string - 在 Scala 中为字符串添加单引号
- ruby-on-rails - 如何倒计时过期日期