Clone or pull repository correctly