Error pushing to github while deploying a Netlify CMS Template

I am trying to Build a site with Netlify CMS NextJS blog Template, But, As i click on Deply to Netlify button and provide a repository name. It creates an empty repository with the given name on Github but does not populate the repo with code instead i just get a blank repo on github.

12:56:10 PM: Build script success
12:56:10 PM: Pushing to repository https://x-access-token:ghs_****
12:56:11 PM: Error pushing to remote repository at https://x-access-token:ghs_****
12:56:11 PM: Finished processing build request in 1m16.643646958s
12:56:13 PM: Site is live ✨

However, the build process does complete and my site goes live without any issue.
I have installed Netlify on my Github account selected the correct repository and granted all required permissions .
I previously had this similar issue but, i was able to fix it by generating new API Key in Git Gateway section whereafter my blank repository got populated with code
This time however the same doesnt work generating new keys doesnt help and i still have a blank repository.

Hi @falcon-Z,

This used to be a bug at Netlify, but it was fixed last year. This shouldn’t be happening anymore.

I’m confused why you mention Git Gateway, as that is something unrelated to site-building. In any case, make sure your Netlify account is linked correctly with GitHub with all the required permissions granted.

Yes, I have verified that i am properly logged in and have granted all required permissions to Netlify But, the issue still persists and I have tried Deleting and re-deploying both my site on Netlify and the empty repository created on Github. The issue persists.
I thought i would try a different template and went with Gatsby where everything went smoothly as expected site got deployed and my Github repository was populated with the project code as expected

I apologize for that comment on Git Gateway. That was my first time and i confusingly related two unrelated things. Now i know :slightly_smiling_face:

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help: - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!