Fix git submodule authentication

This commit is contained in:
Fabian Hauser 2024-09-29 14:36:20 +03:00
parent 67773e9204
commit 05a1a70826

View file

@ -14,7 +14,7 @@ runs:
shell: "nix shell nixpkgs#git-lfs nixpkgs#gnused --command {0}" shell: "nix shell nixpkgs#git-lfs nixpkgs#gnused --command {0}"
run: | run: |
git lfs install git lfs install
git config --global credential.helper store GIT_SERVER=`echo -n "$GITHUB_SERVER_URL" | sed "s%https://%%"`
AUTH_URL=`echo -n "$GITHUB_SERVER_URL" | sed "s%https://%https://oauth2:$GITHUB_TOKEN@%"` echo "machine $GIT_SERVER\nlogin oauth2\npassword $GITHUB_TOKEN" > ~/.netrc
# Disable clone protection to pull LFS as well # Disable clone protection to pull LFS as well
GIT_CLONE_PROTECTION_ACTIVE=false git clone --branch $GITHUB_REF_NAME --recurse-submodules $AUTH_URL/$GITHUB_REPOSITORY . GIT_CLONE_PROTECTION_ACTIVE=false git clone --branch $GITHUB_REF_NAME --recurse-submodules $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .