mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-06 16:38:03 +01:00
Switch to using ssh_url
The previous commit used the wrong URL for a private repo. This was masked by the lack of error loging in logging_subprocess (which will be in a separate branch)
This commit is contained in:
@@ -249,9 +249,7 @@ def backup_repositories(args, output_directory, repositories):
|
|||||||
|
|
||||||
repo_url = repository['clone_url']
|
repo_url = repository['clone_url']
|
||||||
if args.prefer_ssh:
|
if args.prefer_ssh:
|
||||||
git_url = repository.get('git_url')
|
repo_url = repository['ssh_url']
|
||||||
if git_url:
|
|
||||||
repo_url = git_url
|
|
||||||
|
|
||||||
git_command = ['git', 'clone', repo_url, 'repository']
|
git_command = ['git', 'clone', repo_url, 'repository']
|
||||||
logging_subprocess(git_command, logger=None, cwd=repo_cwd)
|
logging_subprocess(git_command, logger=None, cwd=repo_cwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user