简体   繁体   English

如何在 github 页面上发布我的 vue 项目?

[英]How can I publish my vue project on github pages?

I'm trying to publish a stock vue project that created by following command;我正在尝试发布一个通过以下命令创建的股票 vue 项目;

vue create test vue 创建测试

And I'm following the steps which is on the Vue's official website deployment page .我正在按照 Vue 官方网站部署页面上的步骤进行操作。

I'm having a problem when I try to run that command;当我尝试运行该命令时遇到问题;

bash deply.sh bash deply.sh

It builds perfectly but after that I get the following;它完美地构建,但在那之后我得到以下信息;

Initialized empty Git repository in /Users/muratcansenturk/test/dist/.git/
[master (root-commit) 3f9dbf9] deploy
 10 files changed, 28 insertions(+)
 create mode 100644 css/app.3ed01e45.css
 create mode 100644 favicon.ico
 create mode 100644 img/logo.82b9c7a5.png
 create mode 100644 index.html
 create mode 100644 js/about.078d8f6d.js
 create mode 100644 js/about.078d8f6d.js.map
 create mode 100644 js/app.db0cb1ce.js
 create mode 100644 js/app.db0cb1ce.js.map
 create mode 100644 js/chunk-vendors.4a2cfde4.js
 create mode 100644 js/chunk-vendors.4a2cfde4.js.map
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Because of that problem I haven't been able to publish any kind of project on Github Pages.由于这个问题,我一直无法在 Github Pages 上发布任何类型的项目。

Before that problem I just run npm run build then commit files to Github and open on gh-pages successfully.在出现这个问题之前,我只是运行 npm run build 然后将文件提交到 Github 并在 gh-pages 上成功打开。

Also my repo is here .我的回购也在这里

You have to generate and upload an SSH key to github to authenticate commands that read and modify the remote repo.您必须生成一个 SSH 密钥并将其上传到 github 以验证读取和修改远程存储库的命令。

Check out github's help docs on how to do that.查看 github 的帮助文档,了解如何执行此操作。

https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM