The only legal situation I'm aware of where you can have a license from one state and have a vehicle registered in another state is if you're an active duty military member or family member of an active duty military member.

For instance, I registered my truck when purchased in NY, though my driver's license was from MA at the time. All I had to do was give them my FT Drum address and there was no problem.

According to NY state law, if you're living in the state for more than 90 days, you have to transfer your license and plates to your NY address unless you are a servicemember or college student. If you're living in NY for more than that time period and you get pulled over or have an accident, you're on your own, because legally you're driving without a registration, valid insurance and license.