gittalk Error: Validation Failed.
2019-08-29 11:57
2351 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qing_gee/article/details/100134998
在配置 gittalk 的时候,可能出现
gittalk Error: Validation Failed.,相关的问题 issue,参照链接:https://github.com/gitalk/gitalk/issues/102
但假如你觉得很麻烦的话,我也可以直接告诉你答案。引发
Error: Validation Failed.的原因是文章对应的 URL 过长,因为 GitHub 规定不超过 50,至于为什么我也不知道。
怎么解决呢?先找到 comments.html 文件(GitHub Pages 和 Jekyll 搭建的博客系统)
找到以下内容:
var gitalk = new Gitalk({ id: decodeURI('{{ page.url }}'), clientID: '{{ site.gitalk.clientID }}', clientSecret: '{{ site.gitalk.clientSecret }}', repo: '{{ site.gitalk.repo }}', owner: '{{ site.gitalk.owner }}', admin: ['{{ site.gitalk.owner }}'], labels: ['gitment'], perPage: 50, })
注意在ID处加上 decodeURI 函数,可以把 page.url 为
'/%E7%A8%8B%E5%BA%8F%E5%91%98/2019/08/27/java-url-urlconnection.html'转成
"/程序员/2019/08/27/java-url-urlconnection.html",转了以后 id 的长度就变短了,然后问题就解决了。
最后,欢迎关注我的微信公众号「沉默王二」,可以后台留言你的问题。
相关文章推荐
- git之error: failed to push some refs to 'https://git.oschina.net问题解决
- git error
- error: RPC failed; result=22, HTTP code = 413 git push时
- 提交项目到git远程仓库报错:error occurred during unpacking on the remote end: error Missing blob 261c12f4b8e2f5a
- 关于Jenkins构建Git项目出现java.lang.StackOverflowError解决记录
- git clone push Network error:Connection timed out
- Git of [error]could not find git path
- how to fix GIT error: object file is empty?
- “Nothing to push” error in Android studio with Git
- git error: failed to push some refs to...
- git error:Updates were rejected because the tip of your current branch is behind
- Git could not resolve the host github.com error/Git push 403 error
- Git Clone时报 "fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200"原因文件过大需要服务端配置一下
- win git error init_cheap-VirtualAlloc pointer is null, Win32 error 487
- git问题ERROR: Repository not found.的解决
- git android.google 源码:Unknown SSL protocol error in connection to code.google.com:443
- error: could not lock config file .git/config: Permission denied
- [Git & GitHub] 解决办法:error: failed to push some refs to 'https://github.com/xxxx.git'
- git push错误 remote: error: refusing to update checked out branch: refs/heads/master 解决方式