![「NetlifyCMSのエラー対応(NetlifyIdentity/GitGateway)」のアイキャッチ画像](/images/tmb/netlifycms-error.jpg)
久しぶりに新しいサイトにNetlifyCMSを導入した時に少し躓いたのでメモ。
NetlifyIdentity
エラー: Unable to access identity settings. When using git-gateway backend make sure to enable Identity service and Git Gateway.
![](/images/netlifycms-error-1.jpg)
解決法
![](/images/netlifycms-error-2.jpg)
上のタブから移動して、Identityを有効に。
https://app.netlify.com/sites/サイトID/identity
GitGateway
エラー: Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.
![](/images/netlifycms-error-3.jpg)
解決法
![](/images/netlifycms-error-4.jpg)
上のタブからSite settingsに移動して、Git Gatewayを有効に。
https://app.netlify.com/sites/サイトID/settings/identity#services
あと、Githubのブランチのデフォルトがmain
になったので、公式のドキュメントに載っているconfig.toml
から修正が必要。
config.toml
backend:
name: git-gateway
branch: main #[master]から変更