Add function to check if inside bc repo

The script use git to check if inside a bc repo to avoid clone
the new repository inside bc.
Add test for curl exit status

If fail when create the remote repository the setup will be
aborted.