Force proper remote url

This commit is contained in:
Jose Diaz-Gonzalez
2015-11-10 15:36:06 -05:00
parent d9e15e2be2
commit 816447af19

View File

@@ -617,6 +617,10 @@ def fetch_repository(name, remote_url, local_dir, skip_existing=False):
if clone_exists: if clone_exists:
log_info('Updating {0} in {1}'.format(name, local_dir)) log_info('Updating {0} in {1}'.format(name, local_dir))
git_command = ['git', 'remote', 'rm', 'origin']
logging_subprocess(git_command, None, cwd=local_dir)
git_command = ['git', 'remote', 'add', 'origin', remote_url]
logging_subprocess(git_command, None, cwd=local_dir)
git_command = ['git', 'fetch', '--all', '--tags', '--prune'] git_command = ['git', 'fetch', '--all', '--tags', '--prune']
logging_subprocess(git_command, None, cwd=local_dir) logging_subprocess(git_command, None, cwd=local_dir)
else: else: