LoginSignup
7
3

More than 3 years have passed since last update.

GitHub Organizationに属しているレポジトリで Netlify CMS の admin にログインできない時

Posted at

忙しい人のためのSummary

  • GitHub Organization に属しているレポジトリで Netlify CMS を使おうとした時に Admin にログインできない。
  • 解決策: GitHub の Authorized OAuth AppNetlify Auth を許可する。

事象

こんな感じで Netlify CMS の admin を開くと Not Found という意味不明なエラーメッセージが出ます。

スクリーンショット 2019-08-03 16.19.18.png

コンソールを開いて何が起きているのかを確認すると次のようなエラーが出ていました。
deploy している レポジトリのブランチの情報を取ろうとして 404 が返って来ているっぽいです。

auth.js:94 API_ERROR: Not Found
    at new t (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:168:86255)
    at new t.default (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:168:86621)
    at https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:234:52235
    at async https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:234:25032
documentation_url: "https://developer.github.com/v3/repos/branches/#get-branch"
message: "Not Found"

解決策

解決策としては GitHub の Authorized OAuth App で Netlify Auth を許可します。詳しくはキャプチャ取ってみたので、もし詰まったら参考にしてみてください。

netlify-cms-auth1.png

Authorized_OAuth_Apps.png

Connection_with_Netlify_Auth.png

参考にしたIssue

7
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
3