Joji
Joji

Reputation: 5654

Problem with configuring Netlify CMS with Git Gateway

I am trying to use this Gatsby starter with Netlify CMS. https://github.com/stackrole-dev/gatsby-starter-foundation

I followed the instructions exactly but after enabling Git Gateway, when I try to login in as admin I encountered this error massage.

Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.

I have no ideas why it is not working.

My config.yml is

backend:
  name: git-gateway
  commit_messages:
    create: 'Create {{collection}} “{{slug}}”'
    update: 'Update {{collection}} “{{slug}}”'
    delete: 'Delete {{collection}} “{{slug}}”'
    uploadMedia: '[skip ci] Upload “{{path}}”'
    deleteMedia: '[skip ci] Delete “{{path}}”'

local_backend: true # run npx netlify-cms-proxy-server for local testing

media_folder: "static/assets" 
public_folder: "/assets" 

collections:

Upvotes: 8

Views: 7660

Answers (4)

Toluwalemi
Toluwalemi

Reputation: 414

I solved this issue by disabling the git gateway and enabling it again.

  • Go to Site configuration
  • Then navigate to services, it is under the Identity section

Netlify settings page

  • Click on disable git gateway and enable it once again

enter image description here

  • Then try to log into your Netlify CMS it should work.

Upvotes: 0

Abdul Waqar
Abdul Waqar

Reputation: 39

I faced the same issue while configuring Netlify CMS. I faced this issue because I was passing master branch in Netlify CMS config but in GitHub repo my branch was main.My issue was resolved by changing branch config.yaml

Upvotes: 4

Ferran Buireu
Ferran Buireu

Reputation: 29333

You need to enable your settings for git-gateway and external providers in your Netlify as shown in Netlify documentation:

git-gateway

This configuration can be found under https://app.netlify.com/sites/YOURNAME/settings/identity

In addition, your config.yml lacks:

backend:
  name: git-gateway
  repo: username/repository
  branch: master

Note: change username and repository for your names.

Upvotes: 7

ufukcam
ufukcam

Reputation: 83

You can enable git-gateway

Settings > Identity > Services

enter image description here

Upvotes: 4

Related Questions