1

我在一个托管的 VM 上有一个可工作的代码就绪实例。为了从我的笔记本电脑访问 CodeReady 实例,我关注了这些帖子: https://cloud.redhat.com/blog/accessing-codeready-containers-on-a-remote-server/ https://www.opensourcerers.org /2021/03/22/accessing-a-remote-codeready-containers-installation-with-macos/

准备好的代码正在运行,我可以从托管的 VM 登录,但它不能在我的 Mac 上运行。我无法登录,Web 控制台也无法正常工作。

Web 控制台给了我这个回报:

{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
"reason": "Forbidden",
"details": {},
"code": 403
}

(可能是正常的,因为我没有登录)

以下是登录痕迹:

来自主持人:

[archi@openshift ~]$ oc login --loglevel=10 -u developer -p developer https://api.crc.testing:6443
I0119 04:21:36.001209  208199 loader.go:372] Config loaded from file:  /home/archi/.kube/config
I0119 04:21:36.001911  208199 round_trippers.go:435] curl -v -XHEAD  'https://api.crc.testing:6443/'
I0119 04:21:36.022670  208199 round_trippers.go:454] HEAD https://api.crc.testing:6443/ 403 Forbidden in 20 milliseconds
I0119 04:21:36.022694  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.022701  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.022706  208199 round_trippers.go:463]     Content-Length: 186
I0119 04:21:36.022711  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:35 GMT
I0119 04:21:36.022715  208199 round_trippers.go:463]     Audit-Id: 134a0990-fc65-4c12-bdc3-a38b15403263
I0119 04:21:36.022719  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.022724  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.022728  208199 round_trippers.go:463]     X-Content-Type-Options: nosniff
I0119 04:21:36.022733  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.022748  208199 request_token.go:89] GSSAPI Enabled
I0119 04:21:36.022780  208199 round_trippers.go:435] curl -v -XGET  -H "X-Csrf-Token: 1" 'https://api.crc.testing:6443/.well-known/oauth-authorization-server'
I0119 04:21:36.023554  208199 round_trippers.go:454] GET https://api.crc.testing:6443/.well-known/oauth-authorization-server 200 OK in 0 milliseconds
I0119 04:21:36.023573  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.023590  208199 round_trippers.go:463]     Audit-Id: a883e1ef-f980-4e03-929e-6fef9287b2af
I0119 04:21:36.023596  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.023602  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.023607  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.023612  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.023618  208199 round_trippers.go:463]     Content-Length: 573
I0119 04:21:36.023623  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:35 GMT
I0119 04:21:36.098538  208199 request_token.go:470] falling back to kubeconfig CA due to possible x509 error: x509: certificate signed by unknown authority
I0119 04:21:36.098637  208199 round_trippers.go:435] curl -v -XGET  -H "X-Csrf-Token: 1" 'https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=zKtZGzoGlGmjcFXq5AMirTpw9upVkXQAh0J1Eu4ntMw&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code'
I0119 04:21:36.168237  208199 round_trippers.go:454] GET https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=zKtZGzoGlGmjcFXq5AMirTpw9upVkXQAh0J1Eu4ntMw&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code 401 Unauthorized in 69 milliseconds
I0119 04:21:36.168272  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.168281  208199 round_trippers.go:463]     Www-Authenticate: Basic realm="openshift"
I0119 04:21:36.168286  208199 round_trippers.go:463]     X-Dns-Prefetch-Control: off
I0119 04:21:36.168298  208199 round_trippers.go:463]     Content-Length: 0
I0119 04:21:36.168304  208199 round_trippers.go:463]     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
I0119 04:21:36.168309  208199 round_trippers.go:463]     Pragma: no-cache
I0119 04:21:36.168314  208199 round_trippers.go:463]     Referrer-Policy: strict-origin-when-cross-origin
I0119 04:21:36.168319  208199 round_trippers.go:463]     X-Xss-Protection: 1; mode=block
I0119 04:21:36.168324  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.168331  208199 round_trippers.go:463]     Expires: 0
I0119 04:21:36.168336  208199 round_trippers.go:463]     X-Content-Type-Options: nosniff
I0119 04:21:36.168341  208199 round_trippers.go:463]     X-Frame-Options: DENY
I0119 04:21:36.168402  208199 round_trippers.go:435] curl -v -XGET  -H "Authorization: Basic <masked>" -H "X-Csrf-Token: 1" 'https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=zKtZGzoGlGmjcFXq5AMirTpw9upVkXQAh0J1Eu4ntMw&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code'
I0119 04:21:36.347512  208199 round_trippers.go:454] GET https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=zKtZGzoGlGmjcFXq5AMirTpw9upVkXQAh0J1Eu4ntMw&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code 302 Found in 179 milliseconds
I0119 04:21:36.347549  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.347559  208199 round_trippers.go:463]     Set-Cookie: ssn=MTY0MjU4NDA5Nnw1TDJTVlFkaEk2cEdNSHBIYjI5TlBnS1JvRFlkSmVoZXBkcjRob29Wb0xCV3JnYzRtWjc1U2ZqVjNIYnE4Z0tTS0VOU2hpUUtXZ0I2LUQ2Mk43bzdJMkdGdkZ5dnJkd2ROcno3WW9LT2pXV1NjNnpaU1R0bTJWTTBOVmpMbng4Qzk5Y3lpYkh2QVNHRjZuNFZBWWJOV3JzRWxqODBKZGVoX1E9PXz9zrnOYUc5eAnBxbqYWW5RiKtapabsa9ywiSb4WnHvWQ==; Path=/; HttpOnly; Secure
I0119 04:21:36.347566  208199 round_trippers.go:463]     X-Content-Type-Options: nosniff
I0119 04:21:36.347579  208199 round_trippers.go:463]     X-Frame-Options: DENY
I0119 04:21:36.347584  208199 round_trippers.go:463]     X-Xss-Protection: 1; mode=block
I0119 04:21:36.347589  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.347594  208199 round_trippers.go:463]     Content-Length: 0
I0119 04:21:36.347598  208199 round_trippers.go:463]     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
I0119 04:21:36.347605  208199 round_trippers.go:463]     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
I0119 04:21:36.347609  208199 round_trippers.go:463]     Location: https://oauth-openshift.apps-crc.testing/oauth/token/implicit?code=sha256~f9TNNaHwwMyYl8h6B2uD64SHJG12I1nmhHrUHB-08Z0&state=
I0119 04:21:36.347615  208199 round_trippers.go:463]     Referrer-Policy: strict-origin-when-cross-origin
I0119 04:21:36.347622  208199 round_trippers.go:463]     X-Dns-Prefetch-Control: off
I0119 04:21:36.347628  208199 round_trippers.go:463]     Expires: 0
I0119 04:21:36.347634  208199 round_trippers.go:463]     Expires: Fri, 01 Jan 1990 00:00:00 GMT
I0119 04:21:36.347639  208199 round_trippers.go:463]     Pragma: no-cache
I0119 04:21:36.347646  208199 round_trippers.go:463]     Pragma: no-cache
I0119 04:21:36.347830  208199 round_trippers.go:435] curl -v -XPOST  -H "Accept: application/json" -H "Authorization: Basic <masked>" -H "Content-Type: application/x-www-form-urlencoded" 'https://oauth-openshift.apps-crc.testing/oauth/token'
I0119 04:21:36.394481  208199 round_trippers.go:454] POST https://oauth-openshift.apps-crc.testing/oauth/token 200 OK in 46 milliseconds
I0119 04:21:36.394505  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.394512  208199 round_trippers.go:463]     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
I0119 04:21:36.394518  208199 round_trippers.go:463]     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
I0119 04:21:36.394530  208199 round_trippers.go:463]     Referrer-Policy: strict-origin-when-cross-origin
I0119 04:21:36.394535  208199 round_trippers.go:463]     X-Content-Type-Options: nosniff
I0119 04:21:36.394540  208199 round_trippers.go:463]     X-Frame-Options: DENY
I0119 04:21:36.394545  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.394549  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.394555  208199 round_trippers.go:463]     Expires: 0
I0119 04:21:36.394561  208199 round_trippers.go:463]     Expires: Fri, 01 Jan 1990 00:00:00 GMT
I0119 04:21:36.394567  208199 round_trippers.go:463]     X-Dns-Prefetch-Control: off
I0119 04:21:36.394573  208199 round_trippers.go:463]     X-Xss-Protection: 1; mode=block
I0119 04:21:36.394579  208199 round_trippers.go:463]     Pragma: no-cache
I0119 04:21:36.394585  208199 round_trippers.go:463]     Pragma: no-cache
I0119 04:21:36.394591  208199 round_trippers.go:463]     Content-Length: 131
I0119 04:21:36.394821  208199 round_trippers.go:435] curl -v -XGET  -H "Authorization: Bearer <masked>" -H "Accept: application/json, */*" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" 'https://api.crc.testing:6443/apis/user.openshift.io/v1/users/~'
I0119 04:21:36.432723  208199 round_trippers.go:454] GET https://api.crc.testing:6443/apis/user.openshift.io/v1/users/~ 200 OK in 37 milliseconds
I0119 04:21:36.432749  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.432756  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.432760  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.432771  208199 round_trippers.go:463]     Content-Length: 485
I0119 04:21:36.432778  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.432793  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.432806  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.432812  208199 round_trippers.go:463]     Audit-Id: adce6c72-45ea-47d4-9bd6-6fdb2c412f86
I0119 04:21:36.432817  208199 round_trippers.go:463]     Audit-Id: adce6c72-45ea-47d4-9bd6-6fdb2c412f86
I0119 04:21:36.432823  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.432828  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.432832  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.432868  208199 request.go:1181] Response Body: {"kind":"User","apiVersion":"user.openshift.io/v1","metadata":{"name":"developer","uid":"94d9fb78-01b9-4569-8cb8-0c514f0e1499","resourceVersion":"30973","creationTimestamp":"2022-01-18T09:29:20Z","managedFields":[{"manager":"oauth-server","operation":"Update","apiVersion":"user.openshift.io/v1","time":"2022-01-18T09:29:20Z","fieldsType":"FieldsV1","fieldsV1":{"f:identities":{}}}]},"identities":["developer:developer"],"groups":["system:authenticated","system:authenticated:oauth"]}
Login successful.

I0119 04:21:36.433767  208199 round_trippers.go:435] curl -v -XGET  -H "Authorization: Bearer <masked>" -H "Accept: application/json, */*" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" 'https://api.crc.testing:6443/apis/project.openshift.io/v1/projects'
I0119 04:21:36.439115  208199 round_trippers.go:454] GET https://api.crc.testing:6443/apis/project.openshift.io/v1/projects 200 OK in 5 milliseconds
I0119 04:21:36.439133  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.439144  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.439155  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.439160  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.439165  208199 round_trippers.go:463]     Audit-Id: ca6dc458-0aa7-47e2-8c7c-37774f0f7a98
I0119 04:21:36.439171  208199 round_trippers.go:463]     Audit-Id: ca6dc458-0aa7-47e2-8c7c-37774f0f7a98
I0119 04:21:36.439176  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.439186  208199 round_trippers.go:463]     Cache-Control: no-store
I0119 04:21:36.439193  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.439198  208199 round_trippers.go:463]     Content-Length: 87
I0119 04:21:36.439213  208199 request.go:1181] Response Body: {"kind":"ProjectList","apiVersion":"project.openshift.io/v1","metadata":{},"items":[]}
I0119 04:21:36.439842  208199 round_trippers.go:435] curl -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" -H "Authorization: Bearer <masked>" 'https://api.crc.testing:6443/apis/project.openshift.io/v1/projects/default'
I0119 04:21:36.440861  208199 round_trippers.go:454] GET https://api.crc.testing:6443/apis/project.openshift.io/v1/projects/default 403 Forbidden in 0 milliseconds
I0119 04:21:36.440889  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.440896  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.440901  208199 round_trippers.go:463]     Audit-Id: a640a913-83c8-4c0b-a797-72c89394d6a8
I0119 04:21:36.440905  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.440919  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.440935  208199 round_trippers.go:463]     X-Content-Type-Options: nosniff
I0119 04:21:36.440944  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.440950  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.440955  208199 round_trippers.go:463]     Content-Length: 366
I0119 04:21:36.441015  208199 request.go:1181] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"projects.project.openshift.io \"default\" is forbidden: User \"developer\" cannot get resource \"projects\" in API group \"project.openshift.io\" in the namespace \"default\"","reason":"Forbidden","details":{"name":"default","group":"project.openshift.io","kind":"projects"},"code":403}
I0119 04:21:36.441451  208199 request.go:1181] Request Body: {"kind":"SubjectAccessReview","apiVersion":"authorization.openshift.io/v1","namespace":"default","verb":"list","resourceAPIGroup":"","resourceAPIVersion":"","resource":"projectrequests","resourceName":"","path":"","isNonResourceURL":false,"content":null,"user":"","groups":null,"scopes":null}
I0119 04:21:36.441534  208199 round_trippers.go:435] curl -v -XPOST  -H "Authorization: Bearer <masked>" -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" 'https://api.crc.testing:6443/apis/authorization.openshift.io/v1/subjectaccessreviews'
I0119 04:21:36.457681  208199 round_trippers.go:454] POST https://api.crc.testing:6443/apis/authorization.openshift.io/v1/subjectaccessreviews 201 Created in 16 milliseconds
I0119 04:21:36.457706  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.457713  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.457718  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.457728  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.457733  208199 round_trippers.go:463]     Content-Length: 248
I0119 04:21:36.457738  208199 round_trippers.go:463]     Audit-Id: 2597a724-d990-42a7-9784-fa2cc01d249d
I0119 04:21:36.457744  208199 round_trippers.go:463]     Audit-Id: 2597a724-d990-42a7-9784-fa2cc01d249d
I0119 04:21:36.457750  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.457755  208199 round_trippers.go:463]     Cache-Control: no-store
I0119 04:21:36.457762  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.457776  208199 request.go:1181] Response Body: {"kind":"SubjectAccessReviewResponse","apiVersion":"authorization.openshift.io/v1","namespace":"default","allowed":true,"reason":"RBAC: allowed by ClusterRoleBinding \"basic-users\" of ClusterRole \"basic-user\" to Group \"system:authenticated\""}
I0119 04:21:36.457999  208199 request.go:1181] Request Body: {"kind":"SubjectAccessReview","apiVersion":"authorization.openshift.io/v1","namespace":"default","verb":"create","resourceAPIGroup":"","resourceAPIVersion":"","resource":"projectrequests","resourceName":"","path":"","isNonResourceURL":false,"content":null,"user":"","groups":null,"scopes":null}
I0119 04:21:36.458060  208199 round_trippers.go:435] curl -v -XPOST  -H "Authorization: Bearer <masked>" -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" 'https://api.crc.testing:6443/apis/authorization.openshift.io/v1/subjectaccessreviews'
I0119 04:21:36.464460  208199 round_trippers.go:454] POST https://api.crc.testing:6443/apis/authorization.openshift.io/v1/subjectaccessreviews 201 Created in 6 milliseconds
I0119 04:21:36.464482  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.464488  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.464493  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.464504  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.464509  208199 round_trippers.go:463]     Content-Length: 266
I0119 04:21:36.464514  208199 round_trippers.go:463]     Audit-Id: 34b4b3ff-4374-48db-b8f5-accbf88d91fa
I0119 04:21:36.464526  208199 round_trippers.go:463]     Audit-Id: 34b4b3ff-4374-48db-b8f5-accbf88d91fa
I0119 04:21:36.464531  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.464541  208199 round_trippers.go:463]     Cache-Control: no-store
I0119 04:21:36.464548  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.464575  208199 request.go:1181] Response Body: {"kind":"SubjectAccessReviewResponse","apiVersion":"authorization.openshift.io/v1","namespace":"default","allowed":true,"reason":"RBAC: allowed by ClusterRoleBinding \"self-provisioners\" of ClusterRole \"self-provisioner\" to Group \"system:authenticated:oauth\""}
You don't have any projects. You can try to create a new project, by running

    oc new-project <projectname>

I0119 04:21:36.465270  208199 round_trippers.go:435] curl -v -XGET  -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/96e95ce" -H "Accept: application/json, */*" -H "Authorization: Bearer <masked>" 'https://api.crc.testing:6443/api/v1/namespaces/openshift/configmaps/motd'
I0119 04:21:36.467078  208199 round_trippers.go:454] GET https://api.crc.testing:6443/api/v1/namespaces/openshift/configmaps/motd 404 Not Found in 1 milliseconds
I0119 04:21:36.467098  208199 round_trippers.go:460] Response Headers:
I0119 04:21:36.467104  208199 round_trippers.go:463]     Date: Wed, 19 Jan 2022 09:21:36 GMT
I0119 04:21:36.467108  208199 round_trippers.go:463]     Audit-Id: 599e8008-c9c8-440c-949f-0c5020150f33
I0119 04:21:36.467118  208199 round_trippers.go:463]     Cache-Control: no-cache, private
I0119 04:21:36.467123  208199 round_trippers.go:463]     Content-Type: application/json
I0119 04:21:36.467127  208199 round_trippers.go:463]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 04:21:36.467133  208199 round_trippers.go:463]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 04:21:36.467137  208199 round_trippers.go:463]     Content-Length: 188
I0119 04:21:36.467154  208199 request.go:1181] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps \"motd\" not found","reason":"NotFound","details":{"name":"motd","kind":"configmaps"},"code":404}
I0119 04:21:36.468091  208199 loader.go:372] Config loaded from file:  /home/archi/.kube/config
I0119 04:21:36.468973  208199 loader.go:372] Config loaded from file:  /home/archi/.kube/config
I0119 04:21:36.471549  208199 loader.go:372] Config loaded from file:  /home/archi/.kube/config
I0119 04:21:36.473602  208199 loader.go:372] Config loaded from file:  /home/archi/.kube/config

从我的 Mac 笔记本电脑:

jpalon@20183501-mafes ~ % oc login --loglevel=10 -u developer -p developer https://api.crc.testing:6443 
I0119 10:17:35.642271    7772 loader.go:359] Config loaded from file /Users/jpalon/.kube/config
I0119 10:17:35.643852    7772 loader.go:359] Config loaded from file /Users/jpalon/.kube/config
I0119 10:17:35.644983    7772 round_trippers.go:386] curl -k -v -XHEAD  'https://api.crc.testing:6443/'
I0119 10:17:35.697823    7772 round_trippers.go:405] HEAD https://api.crc.testing:6443/  in 52 milliseconds
I0119 10:17:35.697863    7772 round_trippers.go:411] Response Headers:
The server uses a certificate signed by an unknown authority.
You can bypass the certificate check, but any data you send to the server could be intercepted by others.
Use insecure connections? (y/n): y

I0119 10:17:37.236987    7772 round_trippers.go:386] curl -k -v -XGET  -H "X-Csrf-Token: 1" 'https://api.crc.testing:6443/.well-known/oauth-authorization-server'
I0119 10:17:37.330098    7772 round_trippers.go:405] GET https://api.crc.testing:6443/.well-known/oauth-authorization-server 200 OK in 93 milliseconds
I0119 10:17:37.330136    7772 round_trippers.go:411] Response Headers:
I0119 10:17:37.330153    7772 round_trippers.go:414]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 10:17:37.330163    7772 round_trippers.go:414]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 10:17:37.330173    7772 round_trippers.go:414]     Content-Length: 573
I0119 10:17:37.330182    7772 round_trippers.go:414]     Date: Wed, 19 Jan 2022 09:16:54 GMT
I0119 10:17:37.330191    7772 round_trippers.go:414]     Audit-Id: 079a5bf0-fd30-4299-b9b1-ac02d77ad115
I0119 10:17:37.330200    7772 round_trippers.go:414]     Cache-Control: no-cache, private
I0119 10:17:37.330208    7772 round_trippers.go:414]     Content-Type: application/json
I0119 10:17:37.335205    7772 round_trippers.go:386] curl -k -v -XGET  -H "X-Csrf-Token: 1" 'https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=eshiK1mCrrGhIeustT69V6MHRu8RaNRvXK-uDKOcOo0&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code'
I0119 10:17:37.413695    7772 round_trippers.go:405] GET https://oauth-openshift.apps-crc.testing/oauth/authorize?client_id=openshift-challenging-client&code_challenge=eshiK1mCrrGhIeustT69V6MHRu8RaNRvXK-uDKOcOo0&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-openshift.apps-crc.testing%2Foauth%2Ftoken%2Fimplicit&response_type=code 403 Forbidden in 78 milliseconds
I0119 10:17:37.413715    7772 round_trippers.go:411] Response Headers:
I0119 10:17:37.413721    7772 round_trippers.go:414]     X-Content-Type-Options: nosniff
I0119 10:17:37.413724    7772 round_trippers.go:414]     X-Kubernetes-Pf-Flowschema-Uid: 6ef691a6-f20c-4db6-9a5e-67741bd6361d
I0119 10:17:37.413727    7772 round_trippers.go:414]     X-Kubernetes-Pf-Prioritylevel-Uid: fff8ebd1-d484-460f-b444-e378f79393ef
I0119 10:17:37.413731    7772 round_trippers.go:414]     Content-Length: 200
I0119 10:17:37.413734    7772 round_trippers.go:414]     Date: Wed, 19 Jan 2022 09:16:54 GMT
I0119 10:17:37.413737    7772 round_trippers.go:414]     Audit-Id: d7feebbc-bbaa-4969-a05b-ce8f23baab24
I0119 10:17:37.413772    7772 round_trippers.go:414]     Cache-Control: no-cache, private
I0119 10:17:37.413776    7772 round_trippers.go:414]     Content-Type: application/json
I0119 10:17:37.413850    7772 helpers.go:201] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "Internal error occurred: unexpected response: 403",
  "reason": "InternalError",
  "details": {
    "causes": [
      {
        "message": "unexpected response: 403"
      }
    ]
  },
  "code": 500
}]
F0119 10:17:37.413866    7772 helpers.go:119] Error from server (InternalError): Internal error occurred: unexpected response: 403

我的笔记本电脑和托管 VM 之间的配置似乎没问题,因为 openshift oauth 回答了我。
我对这两个测试使用相同的凭据。任何帮助,将不胜感激。

4

0 回答 0