bitbucket-backup
bitbucket-backup copied to clipboard
Team flag not working
First thank you for your script. I tried to run it with -t flag but git clone is failling:
command = "%s https://%s:%[email protected]/%s/%s.git" % (
, as this is translated into wrong url.
As we already get clone urls in repo.get("links").get("clone")
would be better to use this addresses to clone it.
Something like:
if scm == "git": clone_urls = repo.get("links").get("clone") for url in clone_urls: if url.get("name") == "https": clone_url_https = url.get("href") if url.get("name") == "ssh": clone_url_ssh = url.get("href") git_command = "git clone" if mirror: git_command = "git clone --mirror" if http: command = "%s %s" % ( git_command, clone_url_https ) ...