{"id":20536633,"url":"https://github.com/xyhhx/srht-push-mirror","last_synced_at":"2026-03-06T21:32:43.863Z","repository":{"id":238226472,"uuid":"795852283","full_name":"xyhhx/srht-push-mirror","owner":"xyhhx","description":"testing automated pushes from sourcehut","archived":false,"fork":false,"pushed_at":"2024-05-06T00:00:02.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T03:35:42.842Z","etag":null,"topics":["sourcehut"],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~xyhhx/push-mirror","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyhhx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-05-04T08:42:50.000Z","updated_at":"2025-02-13T23:51:48.000Z","dependencies_parsed_at":"2024-05-06T01:25:24.586Z","dependency_job_id":null,"html_url":"https://github.com/xyhhx/srht-push-mirror","commit_stats":null,"previous_names":["xyhhx/push-to-remotes","xyhhx/srht-push-mirror"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xyhhx/srht-push-mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhhx%2Fsrht-push-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhhx%2Fsrht-push-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhhx%2Fsrht-push-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhhx%2Fsrht-push-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyhhx","download_url":"https://codeload.github.com/xyhhx/srht-push-mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhhx%2Fsrht-push-mirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30198661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"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":["sourcehut"],"created_at":"2024-11-16T00:37:22.157Z","updated_at":"2026-03-06T21:32:43.834Z","avatar_url":"https://github.com/xyhhx.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sourcehut Push Mirror \n\nJust a simple hook to push code to remote forges from sourcehut\n\n## Setting up \n\nThe following steps will use jq filter notation to denote parts of the build manifest\n\nThis build process uses personal access tokens instead of SSH keys. The reasoning is that SSH keys give unfettered access to all repos that your account can write to, whereas a personal access token can be restricted somewhat. The actual restrictions that can be applied will vary depending on which forge you're referring to, but we'll cover the popular ones here.\n\n### Setting up Github\n\n1. Generate a personal access token on Github\n    - Go to https://github.com/settings/personal-access-tokens/new \n    - Give it a descriptive name that includes the repo's name \n    - Select *Only select repositories*, and choose the repo you want to push to\n    - Give it **read and write** access to *Contents*\n    - Copy the generated token, obviously\n1. Add the generated token to your sourcehut secrets dashboard\n    - Go to https://builds.sr.ht/secrets\n    - Give the secret a descriptive name. I like to call it \"\u003crepo name\u003e github PAT\" (where `\u003crepo name\u003e` is the name of the repository you're mirroring)\n    - Paste the token into the secret's value\n    - Select **File** as the *Secret type*\n    - For path, choose `~/secrets/github_pat`\n    - Just to be safe, set a mode of `600`\n    - Click *Add secret*, and take note of its UUID\n1. Update the build manifest\n    - Add the UUID for your Github PAT to your `.secrets` list\n    - Populate the `.environment.github_username` and `.environment.github_repo` variables\n        - (The repo is off the format `user/repo` only)\n\n### Setting up any Forgejo or Gitea\n\nThese instructions are almost identical to Github, except for generating the personal access token.\nWe'll use https://codeberg.org as the example here, but this should work for any Forgejo or\nGitea instance.\n\n1. General a personal access token\n    - Go to https://codeberg.org/user/settings/applications \n    - Around the top, under *Generate new token*, add a descriptive name\n    - You can select *All (public, private, and limited)* or *Public only*\n    - Under *Select permissions*, give it **Read and write** access to *repository*\n    - Hit *Generate token*\n    - Copy the generated token, of course\n1. Add the generated token to your sourcehut secrets dashboard\n    - Go to https://builds.sr.ht/secrets\n    - Give the secret a descriptive name. I like to call it \"Codeberg PAT\" (no need to mention any repo, since this PAT can push to any repo you have access to)\n    - Paste the token into the secret's value\n    - Select **File** as the *Secret type*\n    - For path, choose `~/secrets/codeberg_pat`\n    - Just to be safe, set a mode of `600`\n    - Click *Add secret*, and take note of its UUID\n1. Update the build manifest\n    - Add the UUID for your Codeberg PAT to your `.secrets` list\n    - Populate the `.environment.codeberg_username` and `.environment.codeberg_repo` variables\n        - (The repo is off the format `user/repo` only)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyhhx%2Fsrht-push-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyhhx%2Fsrht-push-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyhhx%2Fsrht-push-mirror/lists"}