I want to add packages like SnapKit, Resolver, etc. Actually, it doesn't matter what package I want to add - the same result. Even adding a local package. Here is an error error: Couldn't get a list of tags. Unexpectadly did not find the new dependency in the package graph: sourceControl(identity: snapkit, location: SwiftPM.SPMPackageDependency.SourceControlLocation.remote(SwiftPM.SPMSourceControlURL(sourceControlURL: https://github.com/SnapKit/SnapKit.git)), requirement: 5.7.1 – Next Major)

Steps that didn't help:
rm -rf ~/Library/Developer/Xcode/DerivedData,rm -rf ~/Library/Caches/org.swift.swiftpm,xcodebuild -resolvePackageDependencies -disablePackageRepositoryCache,git config --global tag.forcesignannotated false,swift package updateXcode 16.1 macOS 15.1 (Intel Core i7) iOS 18.0
UPDATE: You can fix the issue by updating to SourceTree version 4.2.10. No further actions needed
It's an issue related to SourceTree. In version 4.2.9, they added a setting to the .gitconfig file that's breaking SPM.
More info here: https://jira.atlassian.com/browse/SRCTREE-8176
Citing @clopex:
Basically you need to run command in terminal: open ~/.gitconfig then remove: [safe] bareRepository = explicit save it and that is
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With