DEV Community

olistik
olistik

Posted on

2

Configure a custom Git repository on Netlify

My personal web site (https://olisti.co) is a Gatsby.js project I used to serve publicly through Netlify but this required me to use Github.

Since I have my own Gitlab instance (https://source.olisti.co) I wanted to configure Netlify's CI to point to my Gitlab repository instead.

After a few attempts, I discovered that it's currently not possible to update the repository URL via:

  • the web UI: since it doesn't provide the option to specify a self-hosted Gitlab instance or to specify a manual Git URL.
  • netlify api updateSite since passing a build_settings object doesn't change the remote configuration, at least for the repo_url attribute.

I had to delete and recreate the Netlify site and configure it with netlify-cli specifying these parameters:

λ netlify sites:create --manual --with-ci
Enter fullscreen mode Exit fullscreen mode

Here, --with-ci does the trick since it allows to specify the ssh URL of the Git repository.

One last hiccup has been while trying to provision the Let's Encrypt SSL certificate. A worrying error message showed up even though the required checks were passing.

It eventually went away after, I suppose, their local cache expired.

And now that I know this, I can import my other repositories. ;-)

Image of Datadog

Measure and Advance Your DevSecOps Maturity

In this white paper, we lay out a DevSecOps maturity model based on our experience helping thousands of organizations advance their DevSecOps practices. Learn the key competencies and practices across four distinct levels of maturity.

Get The White Paper

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more