前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >hexo-deployer-git以token方式部署到Github

hexo-deployer-git以token方式部署到Github

作者头像
用户1316967
发布2022-01-18 17:29:36
1.2K0
发布2022-01-18 17:29:36
举报
文章被收录于专栏:IF奇思社

记hexo-deployer-git远程CI部署踩坑

翻车写法

官方文档中关于config.yml写法

代码语言:javascript
复制
# You can use this:
deploy:
  type: git
  repo: <repository url>
  branch: [branch]
  token: ''
  message: [message]
  name: [git user]
  email: [git email]
  extend_dirs: [extend directory]
  ignore_hidden: false # default is true
  ignore_pattern: regexp  # whatever file that matches the regexp will be ignored when deploying

此时会因为程序读不到token而导致密钥验证失败报错

代码语言:javascript
复制
Logon failed, use ctrl+c to cancel basic credential prompt.
remote: No anonymous write access.
fatal: Authentication failed for 'https://github.com/useblue/blog-ifibe.com.git/'
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed

勉强能跑写法

代码语言:javascript
复制
deploy:
  type: git
  repo:
    github:
      url: <repository url>
      branch: [branch]
      token: ''
  message: [message]
  name: [git user]
  email: [git email]
  extend_dirs: [extend directory]
  ignore_hidden: false # default is true
  ignore_pattern: regexp  # whatever file that matches the 

使用token验证时使用HTTPS方式

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-07-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 翻车写法
  • 勉强能跑写法
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档