A US judge in San Francisco temporarily barred President Donald Trump's administration on Tuesday from ending a programme shielding young people brought to the United States illegally by their parents from deportation.