{"id":20492365,"url":"https://github.com/husarnet/ga-rsync-demo","last_synced_at":"2026-05-27T20:31:34.962Z","repository":{"id":113651651,"uuid":"425113771","full_name":"husarnet/ga-rsync-demo","owner":"husarnet","description":"rsync + Husarnet + GitHub Actions. Copy files to remote host with no public IP from a GitHub workflow.","archived":false,"fork":false,"pushed_at":"2021-11-09T17:52:43.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-06T23:07:54.720Z","etag":null,"topics":["github-actions","husarnet","rsync","vpn"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/husarnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-05T23:51:34.000Z","updated_at":"2023-05-12T15:37:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"28b8cf5a-b4d7-4bdf-a6e3-c5964f8eb2de","html_url":"https://github.com/husarnet/ga-rsync-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/husarnet/ga-rsync-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fga-rsync-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fga-rsync-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fga-rsync-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fga-rsync-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/husarnet","download_url":"https://codeload.github.com/husarnet/ga-rsync-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fga-rsync-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","husarnet","rsync","vpn"],"created_at":"2024-11-15T17:28:46.807Z","updated_at":"2026-05-27T20:31:34.938Z","avatar_url":"https://github.com/husarnet.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-actions-rsync-demo\n\n**Rsync + Husarnet + GitHub Actions**\n\nIn this example using [Husarnet Action for GitHub Actions](https://github.com/marketplace/actions/husarnet) we reach remote device with `my-raspberry` hostname and copy `hello_world.txt` file there.\n\n\u003e **Note**\n\u003e\n\u003e That remote device need to be in the same Husarnet network as the GitHub workflow. Find installation methods [here](https://husarnet.com/docs/). Sample command to connect the remote device to Husarnet network:\n\u003e\n\u003e ```bash\n\u003e sudo husarnet join $HUSARNET_JOINCODE my-raspberry\n\u003e ```\n\n## GitHub repository secrets\n\nIn your own copy of this repo, go to `Settings` \u003e `Secrets` and create the following secrets with `New repository secret` button:\n\n### 🔐 `SSH_PRIVATE_KEY`\n\nSetup SSH key pair **(with NO passphrase!!!)**:\n\n```bash\nssh-keygen -t rsa -b 4096 -C \"GitHub-action\" -f ga-ssh-key\n```\n\nThat command will generate 2 files:\n\n| File | How to use it? |\n| - | - |\n| `ga-ssh-key` | Copy the `ga-ssh-key` file content here to `SSH_PRIVATE_KEY` GitHub secret|\n| `ga-ssh-key.pub` | Inside `my-raspberry` shell execute: `cat ga-ssh-key.pub \u003e\u003e /root/.ssh/authorized_keys` (or paste the file content manually to the new line at the end of `authorized_keys` file in e.g. vim if you generated keys on other host than `my-raspberry`) |\n\n### 🔐 `KNOWN_HOSTS`\n\nNow log into `my-raspberry` device and execute:\n\n```bash\nssh-keyscan -t rsa $(hostname)\n```\n\nCopy output from that command to `KNOWN_HOSTS` GitHub secret.\n\n### 🔐 `HUSARNET_TARGET_HOSTNAME`\n\nIn this example we named our device `my-raspberry`, so just paste this hostname to `HUSARNET_TARGET_HOSTNAME` secret.\n\n### 🔐 `HUSARNET_JOINCODE`\n\nThe Join Code for your Husarnet network. Find it on your user account at https://app.husarnet.com. It looks like this: `fc94:b01d:1803:8dd8:b293:5c7d:7639:932a/eh2yAFK57bM2g8aeR49e3q`\n\n## Triggering the workflow\n\nAfter defining the GitHub secrets you can trigger the workflow manually from GitHub, or by pushing changes to the repo.\n\nAfter the workflow finish its job, you should find `/root/files/hello_world.txt` file on `my-raspberry` device.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusarnet%2Fga-rsync-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhusarnet%2Fga-rsync-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusarnet%2Fga-rsync-demo/lists"}