GitHub self-Hosted runner setup fails with HTTP timeout

I’m trying to configure GitHub self-hosted runner on ubuntu 20.04. While following the procedure I encounter HTTP timeout error from config.sh script.

I tried curl to the github url and that returns me 200 code. Not sure how to proceed further. Could you please help me with this?