Cannot resolve package version

Hi, I cannot resolve package version and it gives error:

Git command 'git -C /Library/Caches/org.swift.swiftpm/repositories/-a59fa5f1 config --get remote.origin.url' failed: fatal: cannot change to ' /Library/Caches/org.swift.swiftpm/repositories/-a59fa5f1': No such file or directory

I have 3 privates packages from my company I cannot share. This error happens to all 3 packages while the public packages resolved successfully.

Sometimes the error would be:

GitShellError(result: <AsyncProcessResult: exit: terminated(code: 128), output:

>)

So far I have tried:

  • Using Resolve package versions/Reset package caches in Xcode
  • Running xcodebuild -resolvePackageDependencies in terminal.
  • Remove, re-add the packages.
  • Delete, reinstall Xcode.

I’m using Xcode 16.4.

What can I do to resolve this issue?

I also face the same problem.

Hi, The particular error code that you encountered indicates that git had an incident. You should contact your IT admin and make sure that the server is accessible on your corporate network and that you have authorization to connect to the repo on the server. For the moment you can perform a git clone or place the repository into the swiftpm repository cache at the location as specified[1] in the Error you received.


  1. you can get there like so mkdir -p /Library/Caches/org.swift.swiftpm/repositories/-a59fa5f1 && cd /Library/Caches/org.swift.swiftpm/repositories/-a59fa5f1, be aware that you need to use the version with the latest commit hash as a59fa5f1 ↩︎

1 Like

Thank you @MinerMinerMain , let me contact the IT department to sort this out.