did your ubuntu can open the website? try to open baidu or any website by firefox in the ubuntu, to double check if your ubuntu connect the network or not, I have tried "curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo" successfully