"You can’t sign in at this time. Try signing in again” when trying to sign in at iCloud System Preferences panel
This is not a question. This is me trying to offer useful info to the community for any users who may find themselves in my situation.
If you encounter errors logging in to iCloud, especially after a failed, or forced, log out of iCloud on your Mac (for instance, if you followed the advise found around here for using “defaults delete MobileMeAccounts”, and are left with a machine that can’t log in to iCloud due to getting the message in the title), the solution (in my case) may be for you to replace the /Library/Keychain content with that from a FRESH OS install.
Note: that’s the Library Keychain found in the root of the drive. NOT your user Keychain Library.
My OS: High Sierra (final version).
My Mac: iMac 12,2
This hardware and software aren’t supported by Apple. They will only advise you to reinstall, or wipe out the system with a fresh installation. A reinstall over the existing OS does NOT fix this problem because it does not replace the root /Library/Keychain. A full system reinstall is NOT necessary so long as you have access to a fresh (or working) OS boot volume with the appropriate freshly installed root /Library/Keychain content (mine was an external USB hard drive that I installed High Sierra on for testing and troubleshooting a previous iCloud sync issue).
I don’t know if this will work for you, but this did work for me after everything else failed to, and it did NOT require a user’s entire system to be reinstalled from scratch!
Good luck!
iMac 27″, macOS 10.13