【问题标题】:How can I publish my vue project on github pages?如何在 github 页面上发布我的 vue 项目?
【发布时间】:2020-06-22 15:41:39
【问题描述】:

我正在尝试发布通过以下命令创建的股票 vue 项目;

vue 创建测试

我正在按照Vue官网部署page上的步骤进行操作。

我在尝试运行该命令时遇到问题;

bash deply.sh

它构建完美,但之后我得到以下内容;

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.

由于这个问题,我无法在 Github Pages 上发布任何类型的项目。

在那个问题之前,我只是运行 npm run build 然后将文件提交到 Github 并成功打开 gh-pages。

我的仓库也是here

【问题讨论】:

  • 这似乎是您的存储库的权限错误。检查这个question

标签: git vue.js github npm github-pages


【解决方案1】:

您必须生成一个 SSH 密钥并将其上传到 github 以验证读取和修改远程 repo 的命令。

查看 github 的帮助文档了解如何操作。

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

【讨论】:

    猜你喜欢
    • 2021-05-21
    • 1970-01-01
    • 1970-01-01
    • 2018-03-08
    • 1970-01-01
    • 2020-12-18
    • 1970-01-01
    • 1970-01-01
    • 2014-11-01
    相关资源
    最近更新 更多