imsun / gitment

A comment system based on GitHub Issues.
https://imsun.github.io/gitment/
MIT License
4.06k stars 347 forks source link

Initialize Comments: [Error] validation failed #65

Closed emptyxl closed 7 years ago

emptyxl commented 7 years ago

初始化失败 显示验证无效 什么情况? 除了在这个里面填 还需要在其他配置文件中配置吗?

var gitment = new Gitment({
      // 根据文章标题设置唯一评论id
      id: '{{page.articleID}}',
      owner: '*',
      repo: *.github.io',
      oauth: {
        client_id: '**',
        client_secret: '**',
      },
    })

为什么会验证失败?

tiexo commented 7 years ago

repo填写仓库名称,不是仓库地址

emptyxl commented 7 years ago

@imsun 这是我的配置 哪里有问题吗?

    var gitment = new Gitment({
      // 根据文章标题设置唯一评论id
      id: '{{page.articleID}}',
      owner: 'emptyxl',
      repo: 'emptyxl.github.io',
      oauth: {
        client_id: 'a3b33d6d205b2d1c1646',
        client_secret: '42ba44ebb21c7999c8ed929c335444517beba50b',
      },
    })

@tiexo 仓库名是这个啊
部署后是有初始化按钮的,点了之后弹窗验证失败

tiexo commented 7 years ago

不要后面的github.io

来自 魅族 PRO 6 Plus

------------------ Original ------------------ From: "empty_xl"notifications@github.com Date: Sat, Aug 19, 2017 09:36 PM To: "imsun/gitment"gitment@noreply.github.com; Cc: "唐门"i@tiexo.cn;"Mention"mention@noreply.github.com; Subject: Re: [imsun/gitment] Initialize Comments: [Error] validation failed(#65)

@imsun 这是我的配置 哪里有问题吗? var gitment = new Gitment({ // 根据文章标题设置唯一评论id id: '{{page.articleID}}', owner: 'emptyxl', repo: 'emptyxl.github.io', oauth: { client_id: 'a3b33d6d205b2d1c1646', client_secret: '42ba44ebb21c7999c8ed929c335444517beba50b', }, })
@tiexo 仓库名是这个啊 部署后是有初始化按钮的,点了之后弹窗验证失败

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

emptyxl commented 7 years ago

@tiexo 我那个仓库名就是emptyxl.github.io啊
去掉github.io 之后显示的[error] not found

tiexo commented 7 years ago

唔,那是要的...

来自 魅族 PRO 6 Plus

------------------ Original ------------------ From: "empty_xl"notifications@github.com Date: Sat, Aug 19, 2017 09:45 PM To: "imsun/gitment"gitment@noreply.github.com; Cc: "唐门"i@tiexo.cn;"Mention"mention@noreply.github.com; Subject: Re: [imsun/gitment] Initialize Comments: [Error] validation failed(#65)

@tiexo 我那个仓库名就是emptyxl.github.io啊 去掉github.io 之后显示的[error] not found

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

emptyxl commented 7 years ago

@tiexo 仓库应该是找到了 就是老验证失败 owner应该就是这个啊 我试过用https://api.github.com/users/emptyxl 获取的id 填过 那样也是not found 很奇怪 大家的都可以用嘛?

emptyxl commented 7 years ago

莫名好了,好像是必须得Authorized OAuth Apps 里面有你注册的那个application 才可以验证通过,可能得等一等

mosdeo commented 7 years ago

@emptyxl 我等了一周都還是 validation failed,請問哪裡可以看有沒有驗證通過呢?

emptyxl commented 7 years ago

@mosdeo 应该不用那么久 几个小时就可以生效
settings-Authorized OAuth Apps 里面 看有没有你注册过的那个Apps 如果有应该是好的,没有的话你把原来注册的删掉重新试几次

mosdeo commented 7 years ago

@emptyxl 我剛剛重新註冊,在 _config.yml 裏面換成和 blog 相同的 repo 就馬上好了,感謝。