GitLab onprem throws 500 when trying to delete repo or click on CI/CD under settings

We started a migration from SVN to Gitlab-onprem installed using omnibus. Gitlab CE version : gitlab-ce-15.7.9-ce.0.e18.x86_64 Git Version 2.40 RHEL : 8.7

Initially, we migrated a few repos while our link was HTTP and later we moved to HTTPS and pushed more repos.

Now when we try to access anything under settings in General or click on CI/CD we get 500 errors on repos that were migrated when our link was HTTP.

All the repos which were migrated with https are working fine.

How do I fix this issue of 500 on repos that were migrated when it was HTTP?

I tried to change the link to http in gitlab.rb and tried to delete the repo but the issue is the same.

When I click on CI/CD under settings or try to make changes in settings general or try to delete the repo we are getting 500.

It’s expected to work fine but the issue is fine with all the repos that were migrated after we moved to https.