Build warnings for MDX files: Could not read from remote repository

Hi I am on a Netlify free plan (no custom domain) hosting a site generated using Docusaurus since Jan 2023. My site is linked to a GitLab repository for continuous deployment.

The site deploys a preview successfully but I notice build warnings for 2 MDX files as follows:

12:59:41 PM: $ docusaurus build
12:59:42 PM: [INFO] [en] Creating an optimized production build...
12:59:42 PM: [WARNING] Error: Failed to retrieve the git history for file "/opt/build/repo/website/blog/tyk/tyk_apig_policies.mdx" with exit code 128: Host key verification failed.
12:59:42 PM: fatal: Could not read from remote repository.
12:59:42 PM: 
12:59:42 PM: Please make sure you have the correct access rights
12:59:42 PM: and the repository exists.
12:59:42 PM: fatal: could not fetch e63524cfd3547ac8c3d4f30c5334e92c7213dc36 from promisor remote
12:59:42 PM: 
12:59:43 PM: [WARNING] Error: Failed to retrieve the git history for file "/opt/build/repo/website/blog/vim/config_summary.mdx" with exit code 128: Host key verification failed.
12:59:43 PM: fatal: Could not read from remote repository.
12:59:43 PM: 
12:59:43 PM: Please make sure you have the correct access rights
12:59:43 PM: and the repository exists.
12:59:43 PM: fatal: could not fetch 5643aac9ba8c9dd0f57211d133d338f112d6532d from promisor remote

Why is this warning only being received for MDX files and why is the access rights warning message occuring when Netlify has been able to successfully clone the repository and perform a Docusaurus build?

Could you try to re-link the site to the repo from the settings?

Thanks for the suggestion @hrishikesh, ok I will give that a go and make a note of the settings first before I try. I will get chance to try it out next weekend and will report back in this thread. It seems weird though that Netlify is able to clone the repository but only for MDX files the warning message happens…

@hrishikesh I tried re-linking to the site from Site Configuration → Build & Deploy → Continuous Deployment → Repository → Link to a different repository and the warning error is still displayed in the logs for MDX files. Why does the warning message appear for MDX files?

Since I re-linked duplicate webhook and deploy keys exist in the GitLab repository

Do I have to delete the existing repository and then re-create?