Cloning a Private GitHub Repository into /tmp Folder for Database Backup

Hi Render Community,

I’m trying to clone a Private GitHub repository into a /tmp folder in the Render shell to run a database dump from there. However, I’ve been encountering errors with every method I’ve tried, including using git clone https://... and SSH.

This is similar to the issue discussed in the post
https://community.render.com/t/clone-another-repository-when-building/6821

@John_B @Raf

My use case involves creating a database backup, and I’d like to avoid setting up a separate application for this purpose.

Here are some additional details:

  1. The Render GitHub App is already set up in the second repository(The repo I am cloning)
  2. I want to create this database backup using pg_dump in reference to these articles below
    https://render.com/docs/postgresql-backups#logical-backups
    https://render.com/docs/backup-postgresql-to-s3

As a workaround, I’ve looked into using GitHub Deploy Keys

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys,

but I’m unsure if this is the best approach or if there’s a more straightforward solution.

Any guidance or suggestions would be greatly appreciated!

Thanks in advance,
Victor

1 Like