Add ability to clone over SSH protocol.

This commit is contained in:
Kamil Winczek 2013-10-03 15:52:57 +01:00
parent 3942eb1f93
commit 5336a70f45

View file

@ -56,6 +56,7 @@ def init_parser():
parser.add_argument("-p", "--password", help="Authenticate with Github API")
parser.add_argument("-P","--prefix", help="Add prefix to repository directory names", default="")
parser.add_argument("-o","--organization", help="Backup Organizational repositories")
parser.add_argument("-S","--ssh", help="Use SSH protocol", action="store_true")
return parser
@ -81,7 +82,7 @@ def clone_repo(repo, dir, args):
else:
options = args.git
os.system('git clone %s %s %s'%(options, repo.git_url, dir))
os.system('git clone %s %s %s'%(options, repo.ssh_url if args.ssh else repo.git_url, dir))
def update_repo(repo, dir, args):