fix: force HTTPS by patching package.json before install
Root cause: Yarn 4.x ignores git config url.*.insteadOf rules and automatically converts git+https:// URLs to SSH (git@github.com:). Solution: Temporarily patch package.json to use direct HTTPS tarball URL instead of git+https:// protocol before yarn install. Changes: - Added 'Fix libsignal URL for Yarn' step before install - Uses sed to replace git+https:// with HTTPS tarball URL - Updated cache key to v3 to force fresh cache - This bypasses Yarn's SSH conversion completely The patch is temporary and only exists in the CI environment. Local development is unaffected. Previous failed attempts: - Run #22, #23: git config rules (Yarn ignored them) - Run #24: invalid Yarn config command - Run #25: retry logic (same SSH conversion issue) This should finally work! 🤞
This commit is contained in:
@@ -62,9 +62,19 @@ jobs:
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
# Include git config in cache key to bust cache when git rules change
|
||||
key: ${{ runner.os }}-yarn-https-v2-${{ hashFiles('**/yarn.lock') }}
|
||||
key: ${{ runner.os }}-yarn-https-v3-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-https-v2-
|
||||
${{ runner.os }}-yarn-https-v3-
|
||||
|
||||
- name: Fix libsignal URL for Yarn
|
||||
run: |
|
||||
# Yarn 4.x ignores git config and converts git+https:// to SSH
|
||||
# Temporarily replace git+https:// with direct HTTPS tarball URL
|
||||
echo "🔧 Patching package.json to use HTTPS instead of git+https://"
|
||||
sed -i 's|"libsignal": "git+https://github.com/whiskeysockets/libsignal-node"|"libsignal": "https://github.com/whiskeysockets/libsignal-node/archive/refs/heads/master.tar.gz"|g' package.json
|
||||
|
||||
# Verify change
|
||||
grep libsignal package.json
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user