New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to persist entry: API_ERROR: Not Found for org/team repo #1816
Comments
Your org probably needs to grant access to your Netlify CMS instance. |
@erquhart I'm not sure how to do that? the Git gateway is enabled and I'm (currently) the sole person behing the org |
Ok, after some messing with the settings turns out if you have Application/oAuth App access restrictions enabled (cf: https://help.github.com/articles/about-oauth-app-access-restrictions/) netlifycms is not able to save the data. I don't see a way to enable access restriction and have NetlifyCMS be granted permission though. The setting is available at |
Have you already requested access? Help article here: https://help.github.com/articles/requesting-organization-approval-for-oauth-apps/ |
You mentioned no webhooks are present on your repo, which is strange considering your closed PR's did have deploy previews. Are you sure no one else is making changes to the repo? For now it's difficult to assess this as a Netlify CMS issue - the current disconnect is between the Netlify platform and your GitHub repo. |
Yeah, pretty sure no one else has access to this. For now I have it working so I guess it's fine. |
Cool - feel free to reach out via chat if you have any other questions. |
Was running into this issue and the solution was different for me. I created a new Collection type and was pointing the collections -> folder property in the config.yml file to a new folder. But because there was no existing markdown files in the folder nothing got pushed up to the repo. Thus, Netlify CMS did not know where to read or write the new collection type to. After creating a test markdown file in the new folder that the collection was referencing the issue was resolved. |
@meinvolk strange, the folder doesn't actually need to exist (or have files) for a folder collection to work, not sure why that happened. |
What if my account is not under any organization? |
(not answering seanabstract directly) just chiming in to say i had this problem and going to https://help.github.com/en/articles/requesting-organization-approval-for-oauth-apps and requesting and getting the organization owner to approve the Netlify Auth app worked for me |
Having the same problem. I am not under an organization. My content overview works, but clicking on a blog post I get
|
I fixed this issue in the same way - After creating a test markdown file in the new folder that the collection was referencing the issue was resolved. |
Ran into this issue, on a site that deployed via Stackbit. Occurred a couple of months after launch. To fix this (or any similar API_ERROR message caused by an app) go to Github settings > Applications > Stackbit [or other app] > configure. If you see a new/pending requests for access from Stackbit or another app, grant access and the API_ERROR will be fixed. |
I had the same issue, and resolved it by setting up the OAuth on my organisation
instead of my personal Github: It's working with the protective restrictions back on now. |
I also had the "Failed to persist entry" error when I switched to using an organisational repo. The quoted link also solved it for me. Thanks! |
I was receiving this same error. None of the above worked, and completely removing restrictions should not be an answer - that is a huge security hole. Netlify Auth showed up under my profile's OAuth apps, but did not allow me to grant access to the organization. What you need to do is login to Netlify, and under "Site Settings" -> "Identity", you need to generate an access token. The authorization that pops up should allow you to grant access to your organization right then and there. This worked for me. |
This sadly didn't work for me :( I was able to generate an access token but I'm still getting 403s |
Idem as the last post above. This error started appearing after trying to link my Netlify repo to my organization instead of a personal Github repo. I regenerated the Git Gateway and also the OAuth secret key and transferred ownership of the OAuth app to the organization, but I'm still getting the same error. |
Hi @lrq3000, another possible option is to create a personal access token and set it under the Git Gateway settings |
I found the issue: I had to disconnect and reconnect to NetlifyCMS to use the new OAuth app. Here are all the steps I had to follow to relink a Netlify instance after migrating to another (organizational) repository: If you want to transfer a Netlify instance from one repo to another (eg, relinking from a personal repository to an organization repository), then the following must be done:
This last step is crucial, otherwise you will get an error message:
|
This worked for me, but instead of setting it up on my organization, I was able to transfer the ownership of the OAuth from my personal account to the organization. Thanks for the insight! |
Describe the bug
Trying to create a new post or update an existing post throws
error
To Reproduce
I used the template starter for Gatsby and then pushed the starter template to an org/team repo. Now when I go to Admin, the existing posts are shown fine but updating or creating a new post throws the above error.
This is the repo in question: https://github.com/awsugblr/awsugblr
This repo works fine: https://github.com/SathyaBhat/gatsby-starter-netlify-cms
Expected behavior
Post persists
Applicable Versions:
CMS configuration
https://github.com/awsugblr/awsugblr/blob/master/static/admin/config.yml
Additional context
This seems to affect the org/team repo, I'm not sure if it is related. Also noticed no web hooks are created for the repo in https://github.com/awsugblr/awsugblr/settings/hooks
The text was updated successfully, but these errors were encountered: