From 816447af1944d78de09d832b1b68d328767262d1 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Nov 2015 15:36:06 -0500 Subject: [PATCH] Force proper remote url --- bin/github-backup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/github-backup b/bin/github-backup index 286ee54..29697dc 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -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: