The Mexico City government rents commuter bikes to visitors on a daily and weekly basis. You'll need a Visa or MasterCard for the deposit and a passport or driver's license for ID. The bicycle share program works with smart cards and allows you to ride for up to 45 minutes between docking stations.
To avoid paying a fine for exceeding 45 minutes, simply exchange the bike at a different station. Ecobici is a great option for exploring the downtown, Roma and Condesa neighborhoods, which have the greatest concentration of stations.