Hi, @jasonb, and welcome to the Netlify community site. Would you please link us to the deploy where the
REPOSITORY_URL environment variable is unavailable?
Regarding changing the URL to something other than the HTTP URL for the site, we always use the HTTP URL. You can change the location of the repo to a privately hosted Git server with manual linking:
If it is a self-hosted GitLab instance, this might be helpful:
Please let us know if there are other questions about this.