Netlify-cms: Can't access private repos

Created on 8 Jun 2018  路  11Comments  路  Source: netlify/netlify-cms

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
Log in with github backend to access a private repo. My user has the correct privileges.

- If the current behavior is a bug, please provide the steps to reproduce.

  1. Add NetlifyCMS to a private repo
  2. Configure CMS to use github backend and provide repo
  3. Try to Log In with github
  4. Not Found notif is triggered

- What is the expected behavior?
Be able to login. My user has access to the repo

Netlify CMS version: 1.8.0
Browser version: Version 66.0.3359.181 (Official Build) (64-bit)

auth docs question

Most helpful comment

I found the issue. Because I already had played a bit with netlifyCMS under my own user (not org), this app was under my own personal settings.
By revoking my user access and trying to log in again I could manage grant access to the org.

Sorry for all the trouble and thanks for the help

All 11 comments

I had this problem when going from public -> private repo. I had go generate a new key.

@robertkarlsson with github backend or with git-gateway?

@robertkarlsson also I never went from public to private. It was always private.

Opened a PR at #1416 with my quick-fix. If it's not the right way or, even better, if I'm doing something wrong please let me know so we can close both the issue and the PR

@pbrandone Is the repo under an GitHub organization, or is it on your personal account?

@tech4him1 under an org

There is an extra step necessary to approve an OAuth application for using an organization's repositories.

@erquhart @talves Can one of you go over the process here? We need to note it in the docs.

@tech4him1 thanks but it seems that netlify CMS doesn't appear under the oAuth apps list.
The only way I can get this to work this way is completely removing application restrictions. Is this the right way?

Did you check under "OAuth Apps" or "Third Party Access"? It's "Third Party Access" that would show the request.

I found the issue. Because I already had played a bit with netlifyCMS under my own user (not org), this app was under my own personal settings.
By revoking my user access and trying to log in again I could manage grant access to the org.

Sorry for all the trouble and thanks for the help

I also wasn't able to access the admin panel for a private repo belonging to an organization. Here's how I fixed it:

  1. Go to https://github.com/settings/applications
  2. Select Authorized OAuth Apps tab
  3. Click on Netlify CMS
  4. Click on Grant next to your organization name

This assumes that you already granted access to Netlify CMS from your private profile.

Was this page helpful?
0 / 5 - 0 ratings