I have been writing automation scripts to generate and update SSL certificates using Namesilo, Letsencrypt and Gitlab APIs. I almost got to the end, but I am getting a 404 error when trying to update the SSL certificate on Gitlab.
The weird part is that the error happens on only one of my two projects. Specifically, running:
curl --header "Private-Token: XXXXXX" "https://gitlab.com/api/v4/projects/pallavagarwal07%2Fshort-links/pages/domains/pallav.xyz"
works fine and fetches the details of domain pallav.xyz
in project short-links
.
But, running:
curl --header "Private-Token: XXXXX" "https://gitlab.com/api/v4/projects/pallavagarwal07%2Fpallavagarwal07.gitlab.io/pages/domains/varstack.com"
returns a 404 error. However, what makes it weirder is that if I remove the domain name varstack.com
from the URL, it gives me the list of domains as expected:
curl --header "Private-Token: XXXXX" "https://gitlab.com/api/v4/projects/pallavagarwal07%2Fpallavagarwal07.gitlab.io/pages/domains"
returns:
[{"domain":"varstack.com","url":"https://varstack.com","certificate":....]