How to rsync private Git repos to avoid sharing credentials

less than 1 minute read

I use a wide variety of computing resources, and don’t want to spill my Git credentials everywhere, whether passwords or SSH keys. A way to edit and update code without going to the full bother of read-only GitHub accounts is by using rsync.

This assumes server is running an SSH dæmon, of course.

On laptop:

rsync -rtvzs --progress \
   --exclude=bin --exclude=.git \
   ~/myprog [email protected]:myprog

where we exclude syncing of Git information (which can really screw up things) and compiled files since they would be platform specific.

Tags:

Categories:

Updated:

Leave a Comment