The commands here seem to be missing the crucial step of creating an authentication proxy for xrootd.
Checking the test setup in the main rucio repository, it creates the proxy like this:
https://github.com/rucio/rucio/blob/788a0d43fa1caa141efcaaa2780765913a8a49be/tools/docker_activate_rses.sh#L35
Calling this line first make upload / download succeed.