Mayor Marion Barry declared yesterday that it is the federal government's responsibility alone -- and not the District government's -- to find alternative housing for the 600 homeless men and women who sleep every night at a decrepit downtown Washington shelter that a judge has ruled can be closed next Saturday.

"Our position unequivocally," Barry said, "is that the federal government made a commitment, a social contract" to renovate the squalid facility at 425 Second St. NW "and ought to keep it."

Moreover, the mayor said the city will not do anything to "assist the federal government in physically removing" the homeless from the 800-bed shelter.

Barry, appearing at a press conference with Mitch Snyder, leader of the Community for Creative Non-Violence, which operates the facility, said city shelters "just can't take 600 to 800 people" if the CCNV shelter is closed.

The mayor said city and federal officials have discussed the impending closing of the shelter, in a World War II-vintage building that was to be demolished after providing temporary office space. But Barry said, "We're not doing anything other than telling the federal government it ought to keep its agreement."

President Reagan, prompted by Snyder's 51-day fast last fall, agreed two days before his reelection to turn the facility into a "model physical shelter." But negotiations between Snyder and federal officials over the extent of the renovations broke down in mutual recriminations.

Snyder sued to force the federal government to do the construction work. U.S. District Judge Charles R. Richey, saying the rat- and vermin-infested facility is uninhabitable, ruled Monday that the government could carry out its plan to close the shelter next Saturday, although not before finding new shelters and devising a long-range plan "to eliminate homelessness in the nation's capital."

The White House said Reagan believes he has met his commitment to Snyder. The federal government has pledged to spend the $2.7 million it planned to use to renovate the Second Street shelter to help secure new facilities for the homeless.

Deputy Undersecretary of Health and Human Services Dixon Arnett said federal officials have tentatively identified possible shelters with beds or space for 780 homeless people, but acknowledged there are "no absolute commitments" for any of the space. Arnett said there would be "nothing firm" on the arrangements until Monday or Tuesday at the earliest.

The HHS official said he is "still optimistic" about solving the shelter crisis, but seemed miffed by Barry's remarks. "He ought to be part of the responsibility," Arnett said. "But I think there is room, even in his finger-wagging statements, to try to solve this."

Snyder, who frequently has clashed with Barry and city officials over the city's shortage of shelter beds for the homeless, said that in this instance "we are not going to dump on the mayor. The president of the United States made a promise he's trying to renege on.

"We're about eight days away from being thrown out on the street," Snyder said. "We hope we can avoid that confrontation. It's going to be a horrible scene if that happens."

While Snyder voiced support for Barry's non-involvement in the dispute, Elizabeth Huguenin, president of the Coalition for the Homeless, an advocacy group for the District's homeless, criticized the mayor's stance.

"We feel he's morally obligated to help in the solution," Huguenin said. "He should be involved as the leader of this city."

Huguenin said coalition leaders will continue to meet with federal officials to try to find new shelters.

Snyder's CCNV group earlier this week appealed Richey's decision to the U.S. Court of Appeals and at the same time asked Richey to keep the Second Street shelter open while the appeal is pending.

Richey rejected that bid yesterday, saying that court rules prohibited him from acting further in the case since his decision had been appealed to a higher court.