๋ฌธ์ ์ํฉ
git@my_private_repo.git: An unknown error occurred. reference 'refs/remotes/origin/main' not found (-1)
SPM์ ์ ํจํค์ง๋ฅผ ์ค์นํ ๋ ์ด๋ฐ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
ํด๊ฒฐ
์ ์คํฌ๋ฆฝํธ๋ฅผ ๋ง๋ค์ด ํด๊ฒฐํ๋ค.
vi fix-spm-cache.sh
๋จผ์ ์ด๋ ๊ฒ ํ์ผ์ ๋ง๋ค์ด์ฃผ๊ณ
#!/bin/bashif [[ $# -eq 0 ]] ; then
echo 'Please call the script with the name of your project as it appears in the derived data directory. Case-insensitive.'
echo 'For example: ./fix-spm-cache.sh myproject'
exit 0
fi# Delete all directories named "remotes" from the global Swift Package Manager cache.
cd ~/Library/Caches/org.swift.swiftpm/repositoriesfor i in $(find . -name "remotes" -type d); do
echo "Deleting $i"
rm -rf $i
done# Find derived data directories for all projects matching the script argument, and
# delete all directories named "remotes" from source package repositories cache for those projects.cd ~/Library/Developer/Xcode/DerivedData/for project in $(find . -iname "$1*" -type d -maxdepth 1); do
for i in $(find "$project/SourcePackages/repositories" -name "remotes" -type d); do
echo "Deleting $i"
rm -rf $i
done
done
์ ์ฝ๋๋ฅผ ๋ณต์ฌํด์ฃผ๊ณ :wq ๋ช ๋ น์ด๋ก ์ ์ฅํ๊ณ ๋์จ๋ค.
chmod +x fix-spm-cache.sh
๊ทธ ๋ค์ chmod ๋ช ๋ น์ด๋ก ํ์ผ์ ๊ถํ์ ๋ถ์ฌํ ํ
./fix-spm-cache.sh [๋ดํ๋ก์ ํธ๋ช
]
ํ์ผ์ ์คํํ๋ค.
์ ์คํฌ๋ฆฝํธ๋ ํ๋ก์ ํธ์ ํ์ ๋ฐ์ดํฐ ๋๋ ํฐ๋ฆฌ์ .NET์ ์ ์ญ Swift Package Manager ์บ์์์ Swift ํจํค์ง ์บ์๋ฅผ ์ญ์ ํ์ฌ ํด๊ฒฐ ํ๋ ๋ฐฉ๋ฒ์ด๋ผ๊ณ ํ๋ค.
์ฐธ๊ณ ํ ๊ณณ
๋ฐ์ํ
'๐ iOS > SwiftUI' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Introspect (0) | 2023.12.06 |
---|---|
SwiftUI Charts๋ก ๋ฐฉ์ฌํ ์ฐจํธ๋ง๋ค๊ธฐ (0) | 2023.06.22 |
[์ฑ์คํ ์ด ๋ฆฌ์ ] Guideline 4.3 - Design - Spam (0) | 2023.03.14 |
[SwiftUI] ์ ๋๋ชน ๋ฐฐ๋๊ด๊ณ ๋ฌ๊ธฐ (0) | 2023.03.02 |
[SwiftUI] Custom Selectable Modal (0) | 2023.02.16 |