From f3d82df100b83617a0902de128dc0f0877c7e5bf Mon Sep 17 00:00:00 2001 From: Brad Date: Fri, 22 Nov 2024 03:53:38 -0600 Subject: [PATCH] Backup: Attempt to fix SSH --- .../workflows/github-action-mirror-sync.yml | 108 ++++++++---------- 1 file changed, 45 insertions(+), 63 deletions(-) diff --git a/.github/workflows/github-action-mirror-sync.yml b/.github/workflows/github-action-mirror-sync.yml index b404b44..9e9b43a 100644 --- a/.github/workflows/github-action-mirror-sync.yml +++ b/.github/workflows/github-action-mirror-sync.yml @@ -16,20 +16,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to Bitbucket + id: sync run: | env mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to Bitbucket - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'git@bitbucket.org:the_archival_one/brs-psp-research-initiative.git' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" + chmod 700 ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_KEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + git remote add mirror git@bitbucket.org:the_archival_one/brs-psp-research-initiative.git + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' codeberg: runs-on: ubuntu-24.04 @@ -39,21 +36,18 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to Codeberg + id: sync run: | env mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to Codeberg - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'git@codeberg.org:thearchivalone/BRS-PSP-Research-Initiative.git' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" - + chmod 700 ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_KEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + git remote add mirror git@codeberg.org:thearchivalone/BRS-PSP-Research-Initiative.git + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' + beanstalk: runs-on: ubuntu-24.04 steps: @@ -62,20 +56,18 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to Beanstalk + id: sync run: | env mkdir -p ~/.ssh - echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to Beanstalk - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'git@the-archival-one.git.beanstalkapp.com:/the-archival-one/brs-psp-research-initiative.git' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" + echo "${{ secrets.BEANSTALK_SSH_PRIVATE }}" > ~/.ssh/id_rsa + chmod 700 ~/.ssh/id_rsa + echo "${{ secrets.BEANSTALK_SSH_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + ssh-keyscan the-archival-one.git.beanstalkapp.com + git remote add mirror git@the-archival-one.git.beanstalkapp.com:/the-archival-one/brs-psp-research-initiative.git + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' gitgud: runs-on: ubuntu-24.04 @@ -85,20 +77,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to GitGud + id: sync run: | env mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to GitGud - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'git@ssh.gitgud.io:thearchivalone/brs-psp-research-initiative.git' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" + chmod 700 ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_KEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + git remote add mirror git@ssh.gitgud.io:thearchivalone/brs-psp-research-initiative.git + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' gitlab: runs-on: ubuntu-24.04 @@ -108,20 +97,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to GitLab + id: sync run: | env mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to GitLab - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'git@gitlab.com:thearchivalone1/BRS-PSP-Research-Initiative.git' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" + chmod 700 ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_KEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + git remote add mirror git@gitlab.com:thearchivalone1/BRS-PSP-Research-Initiative.git + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' sourceforge: runs-on: ubuntu-24.04 @@ -131,21 +117,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup secure connection - id: secure + - name: Sync up to Sourceforge + id: sync run: | - git pull origin main env mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - name: Sync up to Sourceforge - id: sync - uses: yesolutions/mirror-action@master - with: - REMOTE: 'ssh://thearchivalone@git.code.sf.net/p/brs-psp-research-initiative-1/code' - GIT_SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_PRIVATE }} - GIT_SSH_NO_VERIFY_HOST: "true" + chmod 700 ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_KEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + git remote add mirror ssh://thearchivalone@git.code.sf.net/p/brs-psp-research-initiative-1/code + git push --tags --force --prune mirror 'refs/remotes/origin/*:refs/heads/*' archive: runs-on: ubuntu-24.04