{"id":42837674,"url":"https://github.com/bairwell/github2synology","last_synced_at":"2026-01-30T11:46:11.201Z","repository":{"id":63901820,"uuid":"101489110","full_name":"bairwell/github2synology","owner":"bairwell","description":"Backup your Github repositories to your Synology DSM (MIT)","archived":false,"fork":false,"pushed_at":"2019-01-28T07:40:08.000Z","size":7,"stargazers_count":23,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T11:37:31.224Z","etag":null,"topics":["ash","backups","github","shell","synology","synology-nas"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/bairwell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-26T13:56:44.000Z","updated_at":"2024-03-20T01:25:23.000Z","dependencies_parsed_at":"2023-01-14T13:00:24.505Z","dependency_job_id":null,"html_url":"https://github.com/bairwell/github2synology","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bairwell/github2synology","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bairwell%2Fgithub2synology","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bairwell%2Fgithub2synology/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bairwell%2Fgithub2synology/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bairwell%2Fgithub2synology/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bairwell","download_url":"https://codeload.github.com/bairwell/github2synology/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bairwell%2Fgithub2synology/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28911983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ash","backups","github","shell","synology","synology-nas"],"created_at":"2026-01-30T11:46:10.459Z","updated_at":"2026-01-30T11:46:11.196Z","avatar_url":"https://github.com/bairwell.png","language":"Shell","readme":"Github2Synology\n===============\nA simple Ash (practically \"BusyBox bash\") script designed to run on the Synology DS range of file storage servers to backup all repositories (and wikis) for a user from Github.\n\nRunning\n=======\n* Ensure you have `git` installed on the Synology - this can be download from the SynoCommunity. The script also needs cUrl and [jq](https://stedolan.github.io/jq/) but these seem standard on Synologys.\n\n* Now login to Github and go to [https://github.com/settings/tokens]( https://github.com/settings/tokens) and create a personal access token with the following scopes:\n    - repo (repo itself including all subs) - Full control of private repositories\n    - admin:org read:org - Read org and team membership\n\n* Add this token as the OAUTH_TOKEN in line 7 on the `github2synology.sh` script. (`OAUTH_TOKEN=\"[PUT YOUR TOKEN HERE BETWEEN THE QUOTES]\"`)\n* Ensure the backup path is correct on line 9. (`BACKUP_PATH=\"/volume1/serverBackups/github/backup\"`)\n* Copy the script over to your Synology and run it (all via SSH)\n\nProblems?\n=========\nGetting \"Access forbidden/Repository not found\" issues?\n-------------------------------------------------------\nThis is because the Synology doesn't have access to your Github repositories. The \"best (most secure)\" way to resolve this is just to enable \"SSH Key forwarding\" from your Mac/PC to the Synology so it uses your SSH keys for authentication.\n\nOn Mac and Linux command line, you should be able to just create/edit `~/.ssh/config` and add:\n\n```\nHost [synology]\n   ForwardAgent yes\n```\n   \n(replacing synology with the IP/name of your Synology)\n\nIn PuTTy on Windows, this is under `Connection`-\u003e`SSH`-\u003e`Auth`-\u003e`Authentication parameters : Allow Agent Forwarding` (ensure Pagaent is running with a Github recognised key).\n\nTo test if this is setup correctly, try running from the Synology:\n```ssh -T git@github.com```\nyou should get back:\n```Hi xxxxx! You've successfully authenticated, but GitHub does not provide shell access.```\n\n\"It's only backing up 100 repositories, I've access to more\"\n------------------------------------------------------------\nDue to the script's simplicity, it does NOT currently read the Github provided `Link:` Http headers which give the `next` page details.\n\nTo work around this, run the command `curl -I \"https://api.github.com/user/repos?type=all\u0026page=1\u0026per_page=100\" -H \"Authorization: token [OAUTHTOKEN]\"` (replacing `[OAUTHTOKEN]` with your token). You'll then see a line such as:\n`Link: \u003chttps://api.github.com/user/repos?type=all\u0026per_page=100\u0026page=2\u003e; rel=\"next\", \u003chttps://api.github.com/user/repos?type=all\u0026per_page=100\u0026page=3\u003e; rel=\"last\"`\n\nThen just add the Link:...rel=\"next\" entry to the bottom of the script such as:\n```\nAPI_URL=\"https://api.github.com/user/repos?type=all\u0026per_page=100\u0026page=2\"\n\nfetch_fromUrl\n```\nand the `last` and `next` do not match, just repeat these steps changing the `\u0026page=1` increment in the curl command.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbairwell%2Fgithub2synology","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbairwell%2Fgithub2synology","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbairwell%2Fgithub2synology/lists"}