After deleting the keys with the command "security delete-keychain", I opened Xcode and it created the keys again automatically. The Distribution Key had accents in my name, I removed the accents, and everything worked out. Now I can publish again, with KeyChain working.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: