`A JSON web token could not be decoded` error when running action
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github-actions, javascript
- Lĩnh vực
- authentication, ci-cd
Hướng nghiên cứu
The report points to .github/workflows/release-plz.yml and the create-github-app-token@v1 step; start by reviewing how APP_ID and APP_PRIVATE_KEY are supplied to those inputs and compare a failing run with the logged 401 response. Done means determining whether the workflow configuration or the action needs a concrete correction, then documenting or reproducing that finding.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, I get this error when running the action:
Run actions/create-github-app-token@v1
with:
app-id: ***
private-key: ***
github-api-url: https://api.github.com/
owner and repositories not set, creating token for the current repository ("fusion-imu")
Failed to create token for "fusion-imu" (attempt 1): A JSON web token could not be decoded - https://docs.github.com/rest
Failed to create token for "fusion-imu" (attempt 2): A JSON web token could not be decoded - https://docs.github.com/rest
Failed to create token for "fusion-imu" (attempt 3): A JSON web token could not be decoded - https://docs.github.com/rest
Failed to create token for "fusion-imu" (attempt 4): A JSON web token could not be decoded - https://docs.github.com/rest
RequestError [HttpError]: A JSON web token could not be decoded - https://docs.github.com/rest
at /home/runner/work/_actions/actions/create-github-app-token/v1/dist/main.cjs:37050:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async hook4 (/home/runner/work/_actions/actions/create-github-app-token/v1/dist/main.cjs:39454:18)
at async getTokenFromRepository (/home/runner/work/_actions/actions/create-github-app-token/v1/dist/main.cjs:39768:20)
at async RetryOperation._fn (/home/runner/work/_actions/actions/create-github-app-token/v1/dist/main.cjs:39645:24) {
status: 401,
request: {
method: 'GET',
url: 'https://api.github.com/repos/avsaase/fusion-imu/installation',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'actions/create-github-app-token',
authorization: 'bearer [REDACTED]'
},
request: { hook: [Function: bound hook4] AsyncFunction }
Error: A JSON web token could not be decoded - https://docs.github.com/rest
},
response: {
url: 'https://api.github.com/repos/avsaase/fusion-imu/installation',
status: 401,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'content-length': '117',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Wed, 03 Jul 2024 22:33:58 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'E906:311D5D:2A7971:4ADA68:6685D1D2',
'x-xss-protection': '0'
},
data: {
message: 'A JSON web token could not be decoded',
documentation_url: 'https://docs.github.com/rest',
status: '401'
}
},
attemptNumber: 4,
retriesLeft: 0
}
In my workflow file I have
- name: Generate GitHub token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
The corresponding app id and private key are set as secrets in my repository. The private key is copy-pasted directly from the .pem file that downloads when creating a private key.
The app is installed
Did I do something wrong or is this a bug? Thanks.
- Ngôn ngữ chính
- JavaScript
- Star
- 886
- Fork
- 174
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/create-github-app-token
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
actions/create-github-app-token#377 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/create-github-app-token#330 · 1 bình luận · 3 reaction ·
-
stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
actions/create-github-app-token#324 · 1 bình luận · 3 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
actions/create-github-app-token#322 · 1 bình luận · 4 reaction ·
Tất cả issue của actions/create-github-app-token
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
neondatabase/website#5944 ·
-
module: core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·