mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 08:08:02 +01:00
Force proper remote url
This commit is contained in:
@@ -617,6 +617,10 @@ def fetch_repository(name, remote_url, local_dir, skip_existing=False):
|
||||
|
||||
if clone_exists:
|
||||
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']
|
||||
logging_subprocess(git_command, None, cwd=local_dir)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user