The House Foreign Affairs Committee voted 26 to 7 yesterday to bar all U.S. military advisers and assistance from El Salvador unless President Reagan certifies that the government there has met six conditions intended to prevent human rights abuses and promote democratic reform.

Although the committee bill is still a long way from law, it was a clear signal that doubts about Reagan's support for the Salvadoran junta are still very much alive on Capitol Hill.

The amendment to the pending foreign aid bill was supported by all 18 of the 21 Democratic members present and eight of the 15 Republicans, including the ranking minority member, Rep. William S. Broomfield of Michigan.

Sponsors of the amendment were two New York Democrats, Stephen J. Solarz and Jonathan B. Bingham. Solarz, who predicted that the amendment will be adopted by the full House, said: "This vote represents a decisive repudiation of the blank-check military policy of the Reagan administration in El Salvador and constitutes a significant victory for those who believe we should not provide unconditional military aid to the government of El Salvador."

To become law, the amendment must be approved by both the House and Senate; its chances of passage would seem slim in the Republican controlled Senate. Even there, however, several Republicans have expressed concern that the dispatch of American military personnel to train the Salvadoran forces fighting leftist guerrilas could lead the United States into another Vietnam situation.

Administration officials, while saying that they oppose adoption of the Solarz-Bingham amendment on the grounds that it could hinder the president's ability to conduct foreign policy, contended last night that nothing in the amendment conflicts with the administration's own goals.

Specifically, the amendment would require Reagan to certify that the Salvadoran government is "not engaged in a consistent pattern of gross violations of human rights," is achieving "substantial control" over its own security forces, which have been charged with widespread torture and murder, and is committed to continuing economic and social reform and to holding free elections "at an early date."

It also requires a presidential certification that the junta is willing to negotiate "an equitable political solution" to the Salvadoran civil war with opposition factions and is making "good-faith process" in investigating the murders of four American Roman Catholic women missionaries and two Americans advisers on agrarian reform.

When the administration originally decided to increase military aid, it charged that the guerrillas were supplied and controlled by the communist bloc and said that stopping them was a test of U.S. willingness to block communist-inspired terrorism. More recently, as the policy has come under attack from critics charging the junta with dictatorial excesses, the administration has put more stress on arguing that it opposes terrorism from the right as well as the left.

In testimony before a House Appropriations subcommittee yesterday, the accusations against the junta were repeated by several Salvadoran exiles including a former army officer, Capt. Ricardo Alejandro Fiallos. He contended that the armed forces senior command -- including Col. Jaime Abdel Gutierrez, who is the military power on the junta -- had planned and ordered "political assiassinations, kidnappings and indiscriminate murders."