所以我使用Wercker将我的Hugo博客自动部署到Github Pages。 Wercker中的Build步骤工作正常,但在Deploy步骤结束时,我收到错误“gh-pages failed to github pages”
我特意使用lukevivier / gh-pages步骤进行部署。我的YAML如下:
box: debian
build:
steps:
- arjen/hugo-build:
version: "0.14"
theme: hugo-agency-theme
flags: --buildDrafts=true
deploy:
steps:
- install-packages:
packages: git ssh-client
- lukevivier/gh-pages:
token: $GIT_TOKEN
basedir: public
domain: johnnyjanzen.github.io
错误日志如下
export WERCKER_STEP_ROOT="/pipeline/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac"
export WERCKER_STEP_ID="gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac"
export WERCKER_STEP_OWNER="lukevivier"
export WERCKER_STEP_NAME="gh-pages"
export WERCKER_REPORT_NUMBERS_FILE="/report/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac/artifacts"
export WERCKER_GH_PAGES_TOKEN="$GIT_TOKEN"
export WERCKER_GH_PAGES_BASEDIR="public"
export WERCKER_GH_PAGES_DOMAIN="johnnyjanzen.github.io"
source "/pipeline/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac/run.sh" < /dev/null
using github repo "johnnyjanzen/mmucan"
Initialized empty Git repository in /pipeline/source/public/.git/
[master (root-commit) bcacf48] deploy from johnnyjanzen
104 files changed, 19649 insertions(+)
create mode 100644 .DS_Store
create mode 100644 404.html
create mode 100644 CNAME
create mode 100644 css/agency.css
create mode 100644 css/bootstrap.css
create mode 100644 css/bootstrap.min.css
create mode 100755 css/dependenciesBAD.css
create mode 100755 css/styleddBAD.css
create mode 100644 font-awesome/css/font-awesome.css
create mode 100644 font-awesome/css/font-awesome.min.css
create mode 100644 font-awesome/fonts/FontAwesome.otf
create mode 100644 font-awesome/fonts/fontawesome-webfont.eot
create mode 100644 font-awesome/fonts/fontawesome-webfont.svg
create mode 100644 font-awesome/fonts/fontawesome-webfont.ttf
create mode 100644 font-awesome/fonts/fontawesome-webfont.woff
create mode 100644 font-awesome/less/bordered-pulled.less
create mode 100644 font-awesome/less/core.less
create mode 100644 font-awesome/less/fixed-width.less
create mode 100644 font-awesome/less/font-awesome.less
create mode 100644 font-awesome/less/icons.less
create mode 100644 font-awesome/less/larger.less
create mode 100644 font-awesome/less/list.less
create mode 100644 font-awesome/less/mixins.less
create mode 100644 font-awesome/less/path.less
create mode 100644 font-awesome/less/rotated-flipped.less
create mode 100644 font-awesome/less/spinning.less
create mode 100644 font-awesome/less/stacked.less
create mode 100644 font-awesome/less/variables.less
create mode 100644 font-awesome/scss/_bordered-pulled.scss
create mode 100644 font-awesome/scss/_core.scss
create mode 100644 font-awesome/scss/_fixed-width.scss
create mode 100644 font-awesome/scss/_icons.scss
create mode 100644 font-awesome/scss/_larger.scss
create mode 100644 font-awesome/scss/_list.scss
create mode 100644 font-awesome/scss/_mixins.scss
create mode 100644 font-awesome/scss/_path.scss
create mode 100644 font-awesome/scss/_rotated-flipped.scss
create mode 100644 font-awesome/scss/_spinning.scss
create mode 100644 font-awesome/scss/_stacked.scss
create mode 100644 font-awesome/scss/_variables.scss
create mode 100644 font-awesome/scss/font-awesome.scss
create mode 100644 fonts/glyphicons-halflings-regular.eot
create mode 100644 fonts/glyphicons-halflings-regular.svg
create mode 100644 fonts/glyphicons-halflings-regular.ttf
create mode 100644 fonts/glyphicons-halflings-regular.woff
create mode 100644 fonts/glyphicons-halflings-regular.woff2
create mode 100644 img/about/1.jpg
create mode 100644 img/about/2.jpg
create mode 100644 img/about/3.jpg
create mode 100644 img/about/4.jpg
create mode 100644 img/header-bg.jpg
create mode 100644 img/logo_1_transparent.png
create mode 100644 img/logos/aetuts.jpg
create mode 100644 img/logos/creative-market.jpg
create mode 100644 img/logos/designmodo.jpg
create mode 100644 img/logos/envato.jpg
create mode 100644 img/logos/microlancer.jpg
create mode 100644 img/logos/themeforest.jpg
create mode 100644 img/logos/wordpress.jpg
create mode 100644 img/map-image.png
create mode 100644 img/portfolio/dreams-preview.png
create mode 100644 img/portfolio/dreams.png
create mode 100644 img/portfolio/escape-preview.png
create mode 100644 img/portfolio/escape.png
create mode 100644 img/portfolio/golden-preview.png
create mode 100644 img/portfolio/golden.png
create mode 100644 img/portfolio/roundicons-preview.png
create mode 100644 img/portfolio/roundicons.png
create mode 100644 img/portfolio/startup-framework-preview.png
create mode 100644 img/portfolio/startup-framework.png
create mode 100644 img/portfolio/treehouse-preview.png
create mode 100644 img/portfolio/treehouse.png
create mode 100644 img/team/1.jpg
create mode 100644 img/team/2.jpg
create mode 100644 img/team/3.jpg
create mode 100644 index.html
create mode 100644 index.xml
create mode 100644 js/agency.js
create mode 100644 js/bootstrap.js
create mode 100644 js/bootstrap.min.js
create mode 100644 js/cbpAnimatedHeader.js
create mode 100644 js/cbpAnimatedHeader.min.js
create mode 100644 js/classie.js
create mode 100644 js/contact_me.js
create mode 100755 js/dependencies.js
create mode 100644 js/jqBootstrapValidation.js
create mode 100644 js/jquery.js
create mode 100755 js/script.js
create mode 100644 page/1/index.html
create mode 100644 page/2/index.html
create mode 100644 post/2016-02-11-your-filename/index.html
create mode 100644 post/index.html
create mode 100644 post/index.xml
create mode 100644 post/mynew copy 2/index.html
create mode 100644 post/mynew copy 3/index.html
create mode 100644 post/mynew copy 4/index.html
create mode 100644 post/mynew copy 5/index.html
create mode 100644 post/mynew copy 6/index.html
create mode 100644 post/mynew copy 7/index.html
create mode 100644 post/mynew copy/index.html
create mode 100644 post/mynew/index.html
create mode 100644 post/mynew2/index.html
create mode 100644 post/page/1/index.html
create mode 100644 sitemap.xml
remote: Permission to johnnyjanzen/mmucan.git denied to johnnyjanzen.
fatal: unable to access 'https://**my github personal access token**@github.com/johnnyjanzen/mmucan.git/': The requested URL returned error: 403
/pipeline/gh-pages-37f7864e-6ccb-403c-88bd-004af3de71ac/run.sh: line 60: warning: command not found
failed: failed pushing to github pages
我在我的github帐户中创建了一个个人访问令牌,并将其作为环境变量放在Wercker中。
我第一次尝试这个时,我的main / mmucan git存储库只包含一个分支(master)。我在网上读到Wercker依赖于gh-pages分支的地方,所以我创建了这个分支(与主分支相同)但是返回了完全相同的错误日志。
任何帮助都会非常感激,欢呼!
答案 0 :(得分:1)
我回答了自己的问题。我在Github上读到了“个人访问令牌”错误,并认为你勾选了令牌的LIMIT(又名,禁用)访问权限。所以我把所有盒子都没有用了哈哈。
正确的做法是在制作个人访问令牌时勾选所有引用存储库访问权限的框。