Some of my project's dependencies are hosted on a private repository. It works most of the time, but sometimes when I change the current branch with git, I get this error :
❌ git@my_private_repo.git: An unknown error occurred. reference 'refs/remotes/origin/main' not found (-1)
And from that point, it's impossible to compile and my only option is to reset the SPM cache which takes a lot of time.
Any idea on what causes this and how to solve it?