diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-07 23:24:15 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-07 23:24:15 +0100 |
| commit | 74966bbc8f8bbd7d4dadfe65aa17e4d963b470be (patch) | |
| tree | 035472edac28bea2838cc5508f6a54ffa7e386e4 /scripts/push-repo-mirrors.bash | |
| parent | 3a107cfe7ec61694547e81302f7d018d7d9223bd (diff) | |
| download | git.zue.dev-74966bbc8f8bbd7d4dadfe65aa17e4d963b470be.tar git.zue.dev-74966bbc8f8bbd7d4dadfe65aa17e4d963b470be.tar.gz git.zue.dev-74966bbc8f8bbd7d4dadfe65aa17e4d963b470be.tar.bz2 git.zue.dev-74966bbc8f8bbd7d4dadfe65aa17e4d963b470be.tar.xz git.zue.dev-74966bbc8f8bbd7d4dadfe65aa17e4d963b470be.zip | |
strip the https:// prefix from the stored URL before constructing the authenticated push URL
Diffstat (limited to 'scripts/push-repo-mirrors.bash')
| -rw-r--r-- | scripts/push-repo-mirrors.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/push-repo-mirrors.bash b/scripts/push-repo-mirrors.bash index ae63307..43db9a7 100644 --- a/scripts/push-repo-mirrors.bash +++ b/scripts/push-repo-mirrors.bash @@ -39,8 +39,9 @@ for repository in /repositories/*; do GITHUB_TOKEN=$(cat /run/secrets/github_token) + mirror_host="${mirror#https://}" echo "Pushing to GitHub mirror: $mirror" - git push --mirror "https://x-access-token:$GITHUB_TOKEN@$mirror" || echo "Failed to push to $mirror" + git push --mirror "https://x-access-token:$GITHUB_TOKEN@$mirror_host" || echo "Failed to push to $mirror" ;; *) echo "Unknown mirror type: $mirror. Skipping." |
