When Jerry Griffin of Russian Hill shopped for a new car last year, he wanted one that ran on electricity, not gasoline. But without a garage, it seemed impossible.

“I would have, if I had a place to charge it, definitely gotten one of the battery type,” said Griffin, who settled instead on a small gasoline-powered car made by Smart.

The San Francisco metro area, at the intersection of environmental concern and technological prowess, has more electric vehicles than most cities worldwide. But for many residents, buying one remains unrealistic. Even as prices for EVs fall and the cars’ ranges increase, the hassle of plugging them in remains daunting for those who have only street parking. It is a problem that San Francisco and other cities will have to solve as governments around the world look to cut greenhouse gas emissions (California wants to slash them about 40 percent over the next 13 years).

“Obviously, we want to have significantly more charging infrastructure, not just in San Francisco but all around California,” said Assemblyman Phil Ting, D-San Francisco, who plans to introduce a bill next year that would ban new gasoline and diesel cars cars after 2040. Ting has an electric Chevrolet Bolt that he can charge at both home and work.

Charging stations are proliferating in city and corporate garages, thanks to investment by electric utilities and private companies such as ChargePoint and Tesla. But getting to them can be a hassle, and a parking spot at work can be expensive.

More money is coming. A year ago, regulators approved plans from Pacific Gas and Electric Co. to spend $130 million to install 7,500 charging stations in Northern and Central California. It’s an enormous number, and at least 20 percent — but perhaps as much as half — will be used for stations serving multifamily housing.

“There’s no silver bullet for sure, but I think the PG&E program is not to be underestimated,” said Max Baumhefner, an attorney with the Natural Resources Defense Council.

PG&E also has proposed spending $22 million for fast charging stations near multifamily buildings; this would help show whether such chargers could increase electric car usage among residents who lack garages, Baumhefner said.

California is getting about $800 million for charging infrastructure through the settlement with Volkswagen over the German automaker’s diesel emissions cheating devices. Another VW settlement could add millions more.

Rules are changing too. Starting in January, San Francisco will require all new buildings, both residential and commercial, to install wiring to enable 20 percent of parking spots to be electrified, with 10 percent ready to serve electric cars when the building opens.

Berkeley has gone a step further. The city is completing a pilot project that allows a small number of property owners without garages to install a residential charging station, something not previously permitted. But it’s expensive — participants adding curbside stations probably spend $5,000 to $10,000, estimates Sarah Moore, who administers the program — and only a handful of people have done it.

Amy Hale, a central Berkeley resident, installed a curbside charging station last year as part of the program, paying about $4,000 to $6,000 for the project, which included an electrician’s fees and sidewalk work along with the station itself.

Before that, she and her fiance “were basically trying to survive, more or less, without a charger of our own, because it’s illegal to have anything across the sidewalk,” she said. In their desperation, they ran an extension cord to the car — “which wasn’t cool,” she said. It was also inconvenient, because the low voltage on her home outlet meant charging took a long time.

When they went to spots with charging stations, such as Whole Foods or Berkeley Bowl, she said, “We would pay for charging and just take extra-long” to shop.

Despite having installed the charger, Hale can’t reserve the parking spot in front of her house. But she notified the neighbors about the station’s existence, and the vast majority of the time, she is able to park by the charger.

Ultimately, San Francisco will need more charging stations if it is to persuade more residents to go electric. “Among leading EV markets around the world, denser cities like Amsterdam have one public charger per about five electric cars, compared to one public charger per 25-30 electric cars in California markets,” Nic Lutsey, who leads electric vehicle research for the International Council on Clean Transportation, said in an email.

In Amsterdam, many of the parking spots are public, whereas in the U.S., “most electric car owners have their own garage and designated parking,” said Lutsey, who noted that Europeans pushed for early public investments in charging.

A 2013 paper by researchers at Carnegie Mellon University estimated that just 56 percent of vehicles in the U.S. have a dedicated parking spot off the street.

Without available chargers, it’s hard for people who want to be green to take the final step to buy a clean vehicle, said Griffin, the Russian Hill resident.

“It’s an irony of the situation, because I think a lot of people live in cities because deep down they want to live sustainably and live a more compact life,” he said.

The city of Berkeley’s Moore said many residents are finding their own solutions, like working out deals with neighbors. Another creative idea: In Los Angeles, the Department of Water and Power has installed some charging stations connected to the electricity in streetlamps and utility poles. Researchers are also experimenting with wireless charging.

“The good news is that the electric grid is basically everywhere — we just have to extend it the last 10 or 20 feet, to the driveway, to the curbside,” said Baumhefner, who said he used to run an extension cord out of a rental unit window to the driveway to charge his electric car, but now, after moving, has an easier setup.

Ultimately, of course, if the vision of San Francisco ride-hailing leaders Uber and Lyft comes to pass, no one will have a car: They will be shared self-driving cars that can be hailed by app.

“It will be interesting to see how many people in San Francisco even continue to own their own cars,” Ting said.

Kate Galbraith is the assistant business editor at The San Francisco Chronicle. Email: kgalbraith@sfchronicle.com Twitter: @kategalbraith