Skip to content

Commit a0e9cc9

Browse files
committed
More testing
1 parent 1dff56c commit a0e9cc9

2 files changed

Lines changed: 24 additions & 61 deletions

File tree

.github/workflows/sourceforge-mirror.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,43 @@ jobs:
1313
with:
1414
fetch-depth: 0
1515

16-
- name: Setup SSH
16+
- name: Setup SSH with debugging
1717
env:
1818
SF_SSH_KEY: ${{ secrets.SF_SSH_KEY }}
1919
run: |
2020
mkdir -p ~/.ssh
2121
echo "$SF_SSH_KEY" > ~/.ssh/id_rsa
2222
chmod 600 ~/.ssh/id_rsa
23+
24+
# Verify key was written correctly
25+
echo "Key file size:"
26+
wc -c ~/.ssh/id_rsa
27+
echo "Key starts with:"
28+
head -n 1 ~/.ssh/id_rsa
29+
30+
# Add known hosts
2331
ssh-keyscan git.code.sf.net >> ~/.ssh/known_hosts
24-
cat > ~/.ssh/config << EOF
32+
33+
# Create SSH config
34+
cat > ~/.ssh/config << 'EOF'
2535
Host git.code.sf.net
2636
IdentityFile ~/.ssh/id_rsa
2737
IdentitiesOnly yes
28-
StrictHostKeyChecking no
38+
PubkeyAuthentication yes
39+
PasswordAuthentication no
40+
PreferredAuthentications publickey
2941
EOF
3042
chmod 600 ~/.ssh/config
43+
44+
echo "SSH config created:"
45+
cat ~/.ssh/config
3146
32-
- name: Mirror repository
47+
- name: Test SSH connection
3348
run: |
34-
git remote add sf ssh://${{ secrets.SF_USERNAME }}@git.code.sf.net/p/${{ secrets.SF_PROJECT }}/code
49+
ssh -v ${{ secrets.SF_USERNAME }}@git.code.sf.net 2>&1 | head -50 || true
50+
51+
- name: Mirror to SourceForge
52+
run: |
53+
git remote add sf ssh://${{ secrets.SF_USERNAME }}@git.code.sf.net/p/${{ secrets.SF_PROJECT }}/code || true
3554
git push sf master
3655
git push sf --tags

.github/workflows/test-mirror.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)