I needed to migrate some passwords from Apple Keychain to a new Mac. In particular iTerm2 password manager, Coda/Transmit + Cyberduck passwords.
After doing a replace to ~/Library/Keychains/login.keychain-db with the old login.keychain-db file that destroyed my Apple ID. I found the solution on https://library.panic.com/general/keychain-migration/
What I ended up doing was copying the old login.keychain-db to ~/Library/Keychains/ but with a different name, eg: login2.keychain-db
Then entering the app Keychain Access and under File->Add Keychain selecting the copied file, eg: login2.keychain-db
Then I had all my old Keychain on my new Mac but I wanted to clean up.
So, I changed the password from my old Keychain by selecting it on the sidebar going to Edit->Change Password for Keychain “login2” (not sure if going to Edit is necessary but I have crossed something online that said it was). Then type the old password and leave the new password fields blank, press CMD and click to save. Mac will complain the passwords should not be blank but after insisting it worked.
Why I am removing the password, because to copy an item from the old Keychain to the new it is necessary to type the password one time for each item and I had many.
After I selected the passwords and made copy from the old Keychain and paste on the new. Still, necessary to confirm but clicking ok and leaving the password blank was easier.
Finally, I deleted the old (login2) by right-clicking (cmd+click) on the sidebar. I choose the ‘references + files’ option.
I did run into an issues where MacOS was prompting me twice for passwords to authorise access but I was able to solve it by doing this.