Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo博客的gitment评论开启一直失败 #178

Open
JJXiangJiaoJun opened this issue Jan 18, 2019 · 17 comments
Open

hexo博客的gitment评论开启一直失败 #178

JJXiangJiaoJun opened this issue Jan 18, 2019 · 17 comments

Comments

@JJXiangJiaoJun
Copy link

按照教程上配的,我的github pages绑定了个人域名
https//:hongbb.top
OAuth配置如下,应该是没有错误的

_config.yml的配置如下,保证client_id 和 client_secret没有填错

comment:
  gitment:
    enable: true
    owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID
    repo: 'JJXiangJiaoJun.github.io' # 必填项  你的存储评论的repo
    oauth:
      client_id: 'd7df3d5d159f81371d76' # 必填项
      client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项
      redirect_uri: # 可以填也可以不填

设置后博客上显示 Error: Comments Not Initialized

点击 登录 按钮后,无法跳转到github授权界面
浏览器上信息为 https://hongbb.top/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch

看起来好像是call-back url填错了,不过我试了 原来的URL也没用

@zithan
Copy link

zithan commented Jan 22, 2019

作者自己的官方blog一样的问题:Error: Comments Not Initialized

@puddlejumper26
Copy link

我的也是,我是在 hexo d 之后,刷新页面,页面显示Error: Comments Not Initialized,点击Login,然后会跳出对话框[object ProgressEvent],点击确定之后,Gitment区域就显示Logging in... ,会一直持续下去,并且Gitment区域不能操作

@adangran
Copy link

adangran commented Feb 7, 2019

同样的问题

@BlockBB
Copy link

BlockBB commented Feb 13, 2019

我的也是,昨天弄的,github登陆之后浏览器显示:

[object XMLHttpRequestProgressEvent],然后一直在转圈。。。loading commetns

@sherry0429
Copy link

@RikkaBlue
Copy link

可以看这里 https://sherry0429.github.io/2019/02/12/gitment%E4%BF%AE%E5%A4%8D/

你目前博客的gitment就会报object ProgressEven 不知道什么原因,我的icarus也是这种情况

@fireairforce
Copy link

我也遇到同样问题了 = =

@kopa-kongpan
Copy link

解决了吗 我也是一样的问题哎 满脑子很糊涂

@Chiang97912
Copy link

目前网上大部分解决方案都失效了,可以使用下面的方法解决:
打开你的blog本地仓库themes\next\layout_third-party\comments\gitment.ejs将

<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>

修改为:

<link rel="stylesheet" href="https://billts.site/extra_css/gitment.css">
<script src="https://billts.site/js/gitment.js"></script>

上面给出的是gitment汉化版

@JJXiangJiaoJun
Copy link
Author

说一下本人的 解决办法 :
我的github pages绑定了个人域名
https//:hongbb.top 导致重定向一直错误,我只修改了_config.yml 中的 redirect_uri , 就解决了问题,现在使用正常

comment:
  gitment:
    enable: true
    owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID
    repo: 'JJXiangJiaoJun.github.io' # 必填项  你的存储评论的repo
    oauth:
      client_id: 'd7df3d5d159f81371d76' # 必填项
      client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项
      redirect_uri: https//:hongbb.top    #如果绑定了个人域名,这里一定要填上绑定的个人域名!!!!!!!!!!!!!

可以试试将redirect_uri 改成自己绑定的个人域名

@chuhuilove
Copy link

chuhuilove commented Aug 4, 2019

按照楼上所说的方法,gitment没搞定.换了一个评论系统,gittalk ,https://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/这是教程地址..配置起来很简单..

@longxiaojiangi
Copy link

关于不能初始化的问题,我在手机上解决了。这是什么情况?

@f20500909
Copy link

说一下本人的 解决办法 :
我的github pages绑定了个人域名
https//:hongbb.top 导致重定向一直错误,我只修改了_config.yml 中的 redirect_uri , 就解决了问题,现在使用正常

comment:
  gitment:
    enable: true
    owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID
    repo: 'JJXiangJiaoJun.github.io' # 必填项  你的存储评论的repo
    oauth:
      client_id: 'd7df3d5d159f81371d76' # 必填项
      client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项
      redirect_uri: https//:hongbb.top    #如果绑定了个人域名,这里一定要填上绑定的个人域名!!!!!!!!!!!!!

可以试试将redirect_uri 改成自己绑定的个人域名

亲测无效

@JeffersonHuang
Copy link

JeffersonHuang commented Feb 1, 2020

我的gitment 点击login后出现了下面的代码:

> <%- _partial('common/head') %> <%- _partial('common/navbar') %> <% function main_column_class() { switch (column_count()) { case 1: return 'is-12'; case 2: return 'is-8-tablet is-8-desktop is-8-widescreen'; case 3: return 'is-8-tablet is-8-desktop is-6-widescreen' } return ''; } %>
<%- body %>
<%- _partial('common/widget', { position: 'left' }) %> <%- _partial('common/widget', { position: 'right' }) %>
<%- _partial('common/footer') %> <%- _partial('common/scripts') %> <% if (has_config('search.type')) { %> <%- _partial('search/' + get_config('search.type')) %> <% } %>

@janewu66
Copy link

janewu66 commented Aug 9, 2021

有人解决这个问题吗,我的gitment也是一直开启不了

@donkyhote6
Copy link

按照楼上所说的方法,gitment没搞定.换了一个评论系统,gittalk ,[https://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/这是教程地址..配置起来很简单](Car Gameshttps://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/%E8%BF%99%E6%98%AF%E6%95%99%E7%A8%8B%E5%9C%B0%E5%9D%80..%E9%85%8D%E7%BD%AE%E8%B5%B7%E6%9D%A5%E5%BE%88%E7%AE%80%E5%8D%95)..

"Thanks, great blog!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests