【Git】workflows 部署 vuepress 错误“The process ‘/usr/bin/git‘ failed with exit code 1
2023-02-26 09:50:29 时间
项目场景:
博客系统(vuepress)部署采用自动部署文档的Github工作流。
问题描述
工作流运行过程产生错误"The process ‘/usr/bin/git’ failed with exit code 128 ❌
",导致部署失败。
详细工作流运行日志:
Run JamesIves/github-pages-deploy-action@v4
╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
? Support: https://github.com/sponsors/JamesIves
? Maintained by James Ives: https://jamesiv.es
? Getting Started Guide: https://github.com/JamesIves/github-pages-deploy-action
❓ Discussions / Q&A: https://github.com/JamesIves/github-pages-deploy-action/discussions
? Report a Bug: https://github.com/JamesIves/github-pages-deploy-action/issues
Checking configuration and starting deployment… ?
Deploying using Deploy Token… ?
Configuring git…
/usr/bin/git config --global --add safe.directory /home/runner/work/javadirection.github.io/javadirection.github.io
/usr/bin/git config user.name javadirection
/usr/bin/git config user.email 41459401+javadirection@users.noreply.github.com
/usr/bin/git config core.ignorecase false
/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
/usr/bin/git remote rm origin
/usr/bin/git remote add origin ***github.com/javadirection/javadirection.github.io.git
Git configured… ?
Starting to commit changes…
/usr/bin/git ls-remote --heads ***github.com/javadirection/javadirection.github.io.git refs/heads/gh-pages
Creating worktree…
/usr/bin/git worktree add --no-checkout --detach github-pages-deploy-action-temp-deployment-folder
Preparing worktree (detached HEAD c5bddfd)
/usr/bin/git checkout --orphan gh-pages
Switched to a new branch 'gh-pages'
Created the gh-pages branch… ?
/usr/bin/git reset --hard
/usr/bin/git commit --no-verify --allow-empty -m Initial gh-pages commit
[gh-pages (root-commit) d8850af] Initial gh-pages commit
/usr/bin/chmod -R +rw /home/runner/work/javadirection.github.io/javadirection.github.io/docs/.vuepress/dist
/usr/bin/rsync -q -av --checksum --progress /home/runner/work/javadirection.github.io/javadirection.github.io/docs/.vuepress/dist/. github-pages-deploy-action-temp-deployment-folder --delete --exclude CNAME --exclude .nojekyll --exclude .ssh --exclude .git --exclude .github
Checking if there are files to commit…
/usr/bin/git add --all .
/usr/bin/git checkout -b github-pages-deploy-action/srlubmjwh
Switched to a new branch 'github-pages-deploy-action/srlubmjwh'
/usr/bin/git commit -m Deploying to gh-pages from @ javadirection/javadirection.github.io@c5bddfd0c86a68052f02a495637a71ad6b6c2ecc ? --quiet --no-verify
Force-pushing changes...
/usr/bin/git push --force ***github.com/javadirection/javadirection.github.io.git github-pages-deploy-action/srlubmjwh:gh-pages
remote: Permission to javadirection/javadirection.github.io.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/javadirection/javadirection.github.io.git/': The requested URL returned error: 403
Running post deployment cleanup jobs… ?️
/usr/bin/git checkout -B github-pages-deploy-action/srlubmjwh
Reset branch 'github-pages-deploy-action/srlubmjwh'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌
原因分析:
默认情况下,新存储库没有适当的工作流权限。
解决方案:
转到存储库 Setting
选择 Actions>>>General
在"工作流权限(Workflow permissions)"中,选择 Read and write permissions
相关文章
- 【PHP】Largon 快速部署 Laravel 项目
- 【PHP】Composer 介绍
- 【PHP】PHP开发必备配置 - Windows
- PicGo+Gitee构建图床
- Django开发环境搭建
- PS2023软件安装包+安装教程(mac+windows全版本都有,包括最新的2023)
- PS2021软件安装包+安装教程(mac+windows全版本都有,包括最新的2023)
- PS2020软件安装包+安装教程(mac+windows全版本都有,包括最新的2023)
- PS2019软件安装包+安装教程(mac+windows全版本都有,包括最新的2023)
- Linux安装中文字体(已验证)
- vscode配置一个PHP的开发环境(已验证)
- Linux性能调优命令之free
- Linux Shell 编程基础详解——吐血整理,墙裂推荐!
- Linux nsenter 命令简介及 切换宿主机网络为docker容器网络实践
- Linux下安装MySQL及远程连接MySQL
- linux nc命令
- Git安装及使用以及连接GitHub方法详解
- Linux curl命令详解
- 测试必会之 Linux 三剑客之 sed
- Linux常用统计命令之wc