小编Sha*_*vel的帖子

Github Actions - 未授予对存储库的写访问权限

问题

我有一个私有存储库,我正在尝试将 python-semantic-release 添加到 GitHub Actions 中。

当尝试增加版本号时,我收到错误消息,指出我没有对存储库的写访问权限。我已经使用了 Github Classic PAT 和 Finegrained PAT,但两者都不起作用。我授予了所有回购权限只是为了确保我没有搞砸任何事情。

我还在 GitHub Actions 中回应了我的 Secrets.TOKEN,以确保它们也被正确调用。

即使我已生成具有存储库所有权限的访问令牌,为什么我仍会收到写入错误?

主.yml
name: Semantic Release

on:
  push:
    branches:
      - main

jobs:
  release:
    runs-on: ubuntu-latest
    concurrency: release

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Step 1 - Echo out a GitHub Actions Secret to the logs
        run: |
          echo "The GitHub Action Secret will be masked:  "
          echo ${{ secrets.TOKEN }}
          echo "Trick to echo GitHub Actions Secret: …
Run Code Online (Sandbox Code Playgroud)

github access-token github-actions github-secret

5
推荐指数
1
解决办法
4412
查看次数