It seems that the bug happens when registry name contains uppercase characters. I've edited my ~/.swiftpm/configuration/registries.json to lowercase the characters and then lowercase in the project SPM settings and it worked (discovered by my coworker somewhere on the Internet).
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: