travis 自动部署 hexo,加密操作时遇到的问题

2017-06-12 01:04:53 +08:00
 Corbusier

加密操作时 ( travis encrypt-file .travis/id_rsa_blog .travis/ --add )

出现 Can't figure out GitHub repo name. Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. travis <command> -r <owner>/<repo>)

按照错误提示说的做,命令的后面 添加上 -r xxx/xxx.github.io,出现了: storing result as .travis/ DANGER ZONE: Override existing .travis/? |no| yes Is a directory @ rb_sysopen - .travis/ for a full error report, run travis report --org

好像没有什么效果啊...?有没有别的解决方式,谢了!

2111 次点击
所在节点    程序员
3 条回复
yangg
2017-06-12 08:09:54 +08:00
要在 git 仓库里操作,有.git
Corbusier
2017-06-12 08:50:05 +08:00
@yangg 是说博客的根目录下有.git 吗?这里是有的
Corbusier
2017-06-12 12:18:58 +08:00
问题已经解决,方法如下,加密操作时,方法修改为:

```js

travis encrypt -r <githubUserName>/<githubUserName>.github.io GH_Token=XXX

```
cmd 得到的内容添加到`.travis.yml`使用,后续 git 提交操作相同。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/367693

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX