I ran into a bigger problem and am really desperate and downturned because I cannot figure out a solution.
I am using a Notebook with Linux Debian 9, git for version control, bitbucket as source code repository service and netlify as production deployment service. Besides I am using Contentful CMS API to quickly add new pages.
Yesterday I deleted my repository on bitbucket and pushed the same one with some slight changes freshly from my local "backup" repo to bitbucket today.
Pushing is just working fine. However, I cannot deploy with Netlify anymore... I keep getting the following error:
10:21:02 PM: Starting to prepare the repo for build 10:21:05 PM: git ref refs/heads/master does not exist or you do not have permission 10:21:05 PM: Failing build: Failed to prepare repo 10:21:05 PM: failed during stage 'preparing repo': git ref refs/heads/master does not exist 10:21:05 PM: Finished processing build request in 12.473521036s
When I push, Netlify tries to build, so there is a connection between Bitbucket and Netlify but the build fails. In my local repo refs/heads/master does exist. git branch -a also tells me that my branch is master. On bitbucket the branch is also master.
Why won't Netlify build? Is there a problem with the API ID? The API ID might only be valid for the repo I deleted yesterday but then Netlify and Bitbucket wouldn't be able to communicate, right?
I didn't make any changes in Netlify. The only thing I changed is the Repository on Bitbucket. I am assuming that I broke the API ID. I cannot change the API on Netlify, though. Also, there doesn't seem to be any option on Bitbucket for adding it.
And I don't even know if that is the problem. If it is, the only 2 options I have got is deleting the Netlify website and create a new one, choosing the bitbucket repo and granting Netlify full access to it.
But what happens if it won't deploy? Then it is offline and I won't be able to bring it up again.
Can anyone help me? What am I supposed to do? Let me know if you need any additional information.
Do the following to enable Identity service on your site. In the Netlify UI, navigate to your site. Select the Identity tab. Select Enable Identity.
Link a Git repository You can link a site to a Git repository in the Netlify UI. To do so, go to Site settings > Build & deploy > Continuous deployment > Repository and select Link repository. Alternatively, you can link a site to a Git repository with the Netlify CLI.
On Netlify, anyone can set up automatic deploys from: personal public repositories. personal private repositories. organization-owned public repositories.
Netlify CMS 2.0 launches with BitBucket support and a new monorepo architecture. Subscribe to our newsletter to make sure you don't miss anything.
Try the following:
Build and Deploy
Edit Settings
buttonLink to a different repository
This should update your API ID for the new Repository. You may need to manually trigger a deploy after this step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With