我尝试使用 git config user.name 和 git configcredentials.username 将本地 git 存储库的凭据从
08Miguel24
设置为 08Aristodemus24
,这是我当前的用户名,但无济于事,它仍然给了我这个工作流程错误。
我还尝试将我的远程和本地存储库的分支重命名为
main
,因为从中获取此内容的工作流程也被命名为main
,并且仍然给了我这个错误。
我尝试的最后一件事是为我的 github 帐户制作一个细粒度的个人访问令牌,因为工作流程在
profile-3d.yml
中使用了它,但它再次给了我这个错误。
这是原始工作流程
profile-3d.yml
文件,我从中获取它:
on:
schedule: # 03:00 JST == 18:00 UTC
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
这是我当前的
.yml
文件,其中我唯一更改的是 cron
变量,以便每小时运行工作流程:
on:
schedule: # runs every hour
- cron: "0 * * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
我也在 Windows 上,所以可能是
ubuntu-latest
在这里发挥了作用,给了我这个错误吗?