On deity it lasts forever unless they go to war. You need to get into the club early, and stay in the club. My only club ticket this far has been by playing where I started up surrounded by AIs so I could deny them access to each other until they started sailing the blue seas. By then they usually like me after all that trading, so I am allowed to stay in the trading club.
You want those techs. And you must be willing to give anything to get them. Luck with goodie huts, and some really aggressive trading is what you need. Give them tech for tech, give them spare resources, give them cash. (Or found worthless cities and give to them. They like cities...)
On regent (and perhaps on monarch) you can get away with just giving them cash for their techs. Then you can deny them an advantage you have. That's not possible on deity. Atleast not yet.. Once people get better it might be possible. A tech lead early on deity. Sweet.