How to clone openwrt 23.05-rc2 branch?

Branch is just "openwrt-23.05".
rc2 is just a tag

git clone -b openwrt-23.05 https://git.archive.openwrt.org/openwrt.git

Alternatively, you could checkout the rc2 tag.
(but I do not recommend it. You are better off by checking out the current 23.05 HEAD)
Release tag checkout advice: