github - 使用 GitHub Actions 推送存储库时出错:接收 403
问题描述
我正在尝试使用 GitHub 操作执行下面的代码,在推送存储库时得到 403。这里似乎没有任何文档有帮助。请帮助我知道我是否遗漏了什么。
name: Env Variables
on: push
env:
WF_ENV: Available to all jobs
jobs:
create_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Update pre requisites
run: |
sudo apt-get -y install git
- name: Checkout the repo
uses: actions/checkout@v2
- name: Push a random file
run: |
set -xe
pwd
ls -a
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
ls -a
echo $RANDOM >> random.txt
ls -a
git add .
git commit -m "[ACTIONS GITHUB]:Added a Random file"
git remote set-url --add --push origin "https://$GITHUB_ACTOR:$token@github.com/$GITHUB_REPOSITORY.git"
- name: Push the changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
解决方案
推荐阅读
- scala - PySpark:如何更新嵌套列?
- node.js - 如果 mongodb 类型为字符串,则查询仅返回文档
- javascript - 与内存相关的node.js框架错误中的执行
- python - 这两个tensorflow文档中关于repeat和shuffle有冲突吗?
- php - PHP SMTP Office 365 - 发送附件
- python - video.supersample 不存在
- python - 我正在寻找一种方法来从以前的列表中创建一个新列表,但只使用我想要的单词
- node.js - 是否可以在没有重定向的情况下使用 404 http 代码呈现“找不到页面”?
- python - 如何修复 Windows 转义字符在 python 中无法正常工作?
- java - Beam 写入 avro 文件序列化错误