mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18: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:
|
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user