{"id":16220440,"url":"https://github.com/mortonfox/bbtools","last_synced_at":"2026-05-04T05:36:37.629Z","repository":{"id":140593268,"uuid":"99994717","full_name":"mortonfox/bbtools","owner":"mortonfox","description":"Utility scripts for Bitbucket","archived":false,"fork":false,"pushed_at":"2017-08-11T16:24:27.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T23:47:09.961Z","etag":null,"topics":["backup","backup-script","bitbucket","bitbucket-api","bitbucket-backup","download","downloader","git"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mortonfox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-11T05:28:40.000Z","updated_at":"2024-09-05T05:07:37.000Z","dependencies_parsed_at":"2023-05-03T19:33:33.601Z","dependency_job_id":null,"html_url":"https://github.com/mortonfox/bbtools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mortonfox/bbtools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortonfox%2Fbbtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortonfox%2Fbbtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortonfox%2Fbbtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortonfox%2Fbbtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mortonfox","download_url":"https://codeload.github.com/mortonfox/bbtools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortonfox%2Fbbtools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32596533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","backup-script","bitbucket","bitbucket-api","bitbucket-backup","download","downloader","git"],"created_at":"2024-10-10T11:58:43.355Z","updated_at":"2026-05-04T05:36:37.594Z","avatar_url":"https://github.com/mortonfox.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bbtools\n\nbbtools is a set of scripts to do simple things with Bitbucket. Currently,\nthere is only backup\\_repos.rb, which downloads all of a user's repositories\nand produces a git bundle and a zip file for each repository.\n\n## Installation\n\nbbtools uses the rest-client and netrc gems. Run the following to set up\nprerequisites:\n\n```\ngem install rest-client netrc\n```\n\n## Authentication\n\nAlthough bbtools will work fine without Bitbucket authentication, it won't be\nable to access private repositories.\n\nbbtools uses the [netrc gem](https://github.com/heroku/netrc) to retrieve\nlogin credentials from a\n[.netrc file](http://www.gnu.org/software/inetutils/manual/html\\_node/The-\\_002enetrc-file.html)\nin your home directory.\n\nIf you do not have two-factor authentication set up, adding your Bitbucket\npassword to the .netrc file would work. However, I suggest using an app\npassword instead because it is easy to revoke if there is a security breach.\n\nTo generate an app password:\n\n* Log in to Bitbucket. \u003chttps://bitbucket.org/account/signin/\u003e\n* In your dashboard, click on your user icon and select \"Bitbucket settings\".\n* Click on \"App passwords\".\n* Click on \"Create app password\".\n* Enter \"bbtools\" in the label. Select \"Repositories / Read\" and \"Account / Read\".\n* Click on \"Create\".\n* Copy the app password from the popup dialog.\n\nAdd the following to the .netrc file in your home directory:\n\n```\nmachine bitbucket.org\n    login bb-login\n    password bb-app-password\n\nmachine api.bitbucket.org\n    login bb-login\n    password bb-app-password\n```\n\nwhere ```bb-login``` is your Bitbucket user name and ```bb-app-password``` is\nthe app password you copied from the last step above. The information needs to\nbe added twice because the Bitbucket API uses api.bitbucket.org while git uses\nbitbucket.org.\n\n## Usage\n\n### backup\\_repos\n\nRun this script with a username as the first argument. The script will do the\nfollowing:\n\n* Create a folder named repos.\n* git clone each of the user's repositories, excluding forks of other repositories.\n* Create a git bundle of each repository.\n* Run git archive to create a zip file of each repository.\n* Delete the cloned repositories.\n\nWarning: backup\\_repos does not support Mercurial yet. It will skip any\nMercurial repositories in the user's account.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortonfox%2Fbbtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmortonfox%2Fbbtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortonfox%2Fbbtools/lists"}