@@ -13,13 +13,44 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- name: Configure Git Auth for Submodules
|
||||
- name: Configure Git Auth
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
git config --global url."https://${{ github.token }}@git.neru.rip/".insteadOf "https://git.neru.rip/"
|
||||
git config --global url."https://${{ github.token }}@git.neru.rip/".insteadOf "http://git.neru.rip/"
|
||||
# Debug: Show current config before changes
|
||||
echo "Current git config:"
|
||||
git config --global --list || true
|
||||
|
||||
# Set up credential helper
|
||||
git config --global credential.helper "store --file=$HOME/.git-credentials"
|
||||
echo "https://${{ secrets.GITEA_TOKEN }}@git.neru.rip" > $HOME/.git-credentials
|
||||
|
||||
# Alternative: use URL rewrite with more precise matching
|
||||
git config --global url."https://${{ secrets.GITEA_TOKEN }}@git.neru.rip/".insteadOf "https://git.neru.rip/"
|
||||
|
||||
# Also try with http variant
|
||||
git config --global url."https://${{ secrets.GITEA_TOKEN }}@git.neru.rip/".insteadOf "http://git.neru.rip/"
|
||||
|
||||
# Force git to use the credential store
|
||||
git config --global credential.useHttpPath true
|
||||
|
||||
# Debug: Show config after changes
|
||||
echo "Updated git config:"
|
||||
git config --global --list | grep -i url || true
|
||||
echo "Credential file:"
|
||||
cat $HOME/.git-credentials || true
|
||||
|
||||
- name: Test Authentication
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
# Test if authentication works
|
||||
echo "Testing authentication to git.neru.rip..."
|
||||
git ls-remote https://git.neru.rip/neru/nerutils.git HEAD || true
|
||||
|
||||
git config --global url."https://${{ github.token }}@git.neru.rip/".insteadOf "git@git.neru.rip:"
|
||||
|
||||
- name: Fetch Submodules
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user