Former Homeland Security Secretary Jeh Johnson told a congressional panel on Wednesday he wasn’t informed for months that Russian hackers had broken into computer systems at the Democratic National Committee — which blithely shrugged off help from federal authorities.

“In retrospect . . . I should have bought a sleeping bag and camped out in front of the DNC in late summer,” Johnson told the House Intelligence Committee.

Johnson said he was “not happy” to learn so late that the DNC had been hacked, and he also said its officials rejected help from Homeland Security professionals to identify the intruders and patch vulnerabilities in its IT system.

“The answer [from the DNC], to the best of my recollection, was not reassuring. The FBI and the DNC had been in contact with each other months before about the intrusion, and the DNC did not feel it needed DHS’s assistance at that time,” Johnson said.

Rep. Trey Gowdy (R-SC) argued that even if Johnson had camped out at the DNC, it wouldn’t have made “any difference,” since it wasn’t cooperating with the feds.

Johnson said Russian President Vladimir Putin “pure and simple” directed cyberattacks to try to influence the election, but didn’t succeed in altering any actual ballots.