The Senate, repelling a Democratic assault on another of President Reagan's judicial nominees, voted 52 to 42 yesterday to confirm Sidney A. Fitzwater as a U.S. District Court judge in Texas.

Despite sharp criticism of Fitzwater's role in a 1982 sign-posting incident, the Senate mustered the necessary 60 votes to cut off debate on the nomination. But the final tally brought the second-largest negative vote against a Reagan nominee, one less than the 43 senators who opposed appeals court nominee Alex Kozinski last November because of questions about his temperament.

Opposition to Fitzwater, 32, a state judge who was recommended by Sen. Phil Gramm (R-Tex.), centered on his posting of warning signs in minority precincts in Dallas the night before the 1982 election. The 24-foot signs warned voters that "you can be imprisoned" for violating Texas election law. The Justice Department later found fault with the sign-posting.

Critics, led by Sen. Edward M. Kennedy (D-Mass.), called the signs a misleading attempt to intimidate minority voters. They said no Texas law makes it a crime, as the signs said, to "influence or try to influence a voter how to vote."

But Sen. Paul Simon (D-Ill.) argued that Fitzwater had simply erred and would be an unbiased judge. Fitzwater testified that he posted the signs at the request of other Republican judges and did not know that they were targeted at minority precincts.

Yesterday's vote was widely regarded as a test of strength for Senate Republicans over a nominee targeted for defeat by liberal and civil rights groups.