当我尝试在 Github 页面上发布我的 Vue 应用程序时,当我 运行 npm 运行 部署时,我在终端中遇到了一些错误

when I try Publish my Vue App on Github Pages i getting some Errors in terminal when i run npm run deploy

终端错误

fatal: invalid refspec 'main:'
npm ERR! code ELIFECYCLE
npm ERR! errno 128
npm ERR! find-a-coach@0.1.0 deploy: `sh deploy.sh`
npm ERR! Exit status 128
npm ERR!
npm ERR! Failed at the find-a-coach@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mohamed mohamed\AppData\Roaming\npm-cache\_logs21-08-07T18_12_52_349Z-debug.log

部署脚本

    #!/usr/bin/env sh
set -e

npm run build
cd dist
git init
git add -A
git commit -m "New Deployment"
git push -f git@github.com:muojahead/find-a-coach.git main: github-pages
cd -

我在 github 设置中添加了 SSH 密钥,我上传文件的分支是“main”

您忘记了在部署脚本中首先 运行 npm install