If you’re having broader problems with Mac OS X Wi-Fi where it doesn’t work at all or doesn’t work after waking from sleep, try the above methods in combination with removing the network and renewing the DHCP lease.
Mac OS X should now remember the wifi password without incident. Reboot the Mac and re-join the wireless network.Authenticate the removal, then close out of Keychain Access.Right-click on the router name and choose “Delete RouterName”.Locate and select the name of the problematic router, if there are multiple entries for a single router select them all.Using Keychain Access search box in the upper right corner, search for “Airport network password”.Hit Command+Spacebar for Spotlight and search for “Keychain Access”, launch the app.Sometimes repairing the keychain can be enough to resolve issues with passwords being remembered by OS X, but if not carry on with a solution that definitely works below: Remove Wireless Networks from Keychain
Enter the password accompanying the given user name.Pull down the “Keychain Access” menu and select “Keychain First Aid”.Hit Command+Spacebar to bring up Spotlight, launch “Keychain Access”.