Change github repo for existing service

Hey there–is it possible to change the connected github repo for an existing service? I know that I can create a new service, but trying to minimize the chance of an error from an accidental configuration change, etc. (In this case it is not even truly a different github repo–but I had to change my github username which seems to have broken the connections between render and my repos.

Thanks!

Eric

Hi @mayefsky, I’ve reached out in a private message to get more details.

Hello,

I have basically the same question. Are you able to advise? As an overview…

We have a number of services running which are linked to repos in my private Github account. I have recently migrated the repos to a Github organization and need to re-point all the render services at the Github organization. Can you advise on how to do this while minimizing risk / downtime?

Please let me know if I should open a separate topic.

Many thanks in advance!

Rob

Hi Rob, let’s continue this in direct messaging.

Hi dan, Can you help me out too.
I launch a service with a public rep. now I want to switch to my private repo. how can I do that?

Or how can I launch a new service with the old database?

Hi @tom_li, I’ll be happy to help you out. It’s easier to launch a new service with the old database. All of the services and databases deployed by the same user or team are created within a private network. You can connect from the new service to the old database within this private network. When you establish a connection, use the internal connection string listed in the Render dashboard along with the database.

Was the public repo using infrastructure as code? If so, you’ll want to Disconnect YAML so the old service and database are no longer managed by the render.yaml file in the public repo.

Hi david

how do I switch the old database to the new service. I cannot modify the internal connection string at the database

You can’t modify the database’s internal connection string, but if I’m understanding your setup correctly, you can supply the new service with that same connection string for the old database.

Where would I do that david?

at service or database?

Hello! You should do that at your service. You shouldn’t need to make changes to your database.

just the database_url right? or something also?

That’s likely to be what you need to change, yes. I can’t guarantee it’s the only thing, though, as I’m not sure how your service is configured.

1 Like